The men, Abid Malhi and Shafqat Hussain, were convicted of mass rape, kidnapping, theft and terrorism crimes, according to a written order issued by the judge in the eastern city of Lahore.
The woman was raped on the side of a highway in Punjab province after her car ran out of fuel while she was driving her two children in September.
Less than 3% of sexual assault or rape cases result in conviction in Pakistan, according to Karachi’s War Against Rape group.
The two convicts were also sentenced to life imprisonment, fined and their assets confiscated, Rauf Wattoo, the public prosecutor involved in the case, told Reuters.
“The survivor identified the convicts twice during the identification parade in the prison and while filing her statement in front of the judge,” said another prosecutor, Waqar Bhatti.
Human rights activists have called for an end to a culture that they say blames victims of sexual violence. After the September rape, a police officer publicly questioned why the woman was driving alone at night with her children.