The official said details of the consensual sex emerged when police investigated her complaint against her stepfather and another man of sexually abusing her. He said the sentence includes an option for the flogging to be carried out when the girl turns 18.
Her partner has not been identified and it was not clear how hard the police tried to identify him, he said.
Government spokesman Masood Imad said the government considered her a victim of sexual abuse and wants the sentence revoked.