Police said the families of the two girls are related.
Members of both had joined forces to decide what should be done.
"A jirga [village council] had ordered the rape of a 16-year-old girl as punishment, as her brother had raped a 12-year-old," police official Allah Baksh told AFP.
He said the village council was approached earlier this month by a man who said his 12-year-old sister had been raped by their cousin.
The council then ordered the complainant to rape the sister of the accused in return - which police say he did.
Pakistan's Dawn newspaper reported that the girl was forced to appear before the group and raped in front of them and her parents.
The mothers of the two girls later filed complaints at the local police station.
Medical examinations have confirmed rape in both cases.