The incident happened on March 20 in Toba Tek Singh, a town in Punjab province 275 kilometres (172 miles) southwest of Lahore.
"A boy named Waseem was caught in the act with a 16-year old girl and the whole neighbourhood gathered demanding to kill the boy," Naeem Yousuf, a local police official, told AFP.
"The boy's family then gave the girl's family the option of raping any woman in their family," he said. They chose a 40-year-old woman, who was duly raped by the brother of the 16-year-old girl.
According to Naeem, the two families then drafted a written agreement about the "settlement" stating that they would forget the incident and hold no grudges.
Abdul Majeed, chief of the local police station, said one of his staff obtained the written agreement and a case was lodged against the ten people from both families who signed it.
Often they are ordered by jirgas, or village councils formed of local elders who bypass the justice system. But Majeed said there was no jirga in the area and the people involved were mostly labourers.
A jirga was involved in one of South Asia's most infamous cases of sexual violence against women when in 2002 it ordered the gang-rape of a woman called Mukhtar Mai after her brother was falsely accused of rape.
Mai made the unusual decision to defy her rapists and take them to court. Her attackers walked free but she went on to become a high-profile women's rights activist.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)