Pakistan's Senate has voted to end child marriage, despite determined opposition from religious parties against raising the age girls can marry to 18.
Human rights activists welcomed the vote, saying child marriage increased rates of deaths during childbirth and increased poverty and illiteracy.
Monday's vote passed the Child Marriage Restraint Bill to impose a minimum age of 18 across the country of 210 million.
But the bill still has to pass through the National Assembly, where it is likely to face renewed opposition from hardliners, and then be passed at the provincial level.
The UN estimates one in five Pakistani women married before they were 18 and 3 per cent before they were 15.
“This is an important first step,” said Saroop Ijaz, Pakistan researcher for Human Rights Watch. “The situation in terms of child marriage, particularly for girls, is very, very grave.
“It's a real, real problem affecting millions of children. It's an important step in the right direction. The challenge will be to enforce it.”
The 1929 Child Marriage Restraint Act sets the legal age of marriage for boys to 18 and 16 for girls.
But that is rarely enforced, Mr Ijaz said, said with courts often invoking Islamic law to say any girl who had gone through puberty was considered an adult and fit to marry.
Child marriage is “deeply rooted in tradition, culture and customary practices" in Pakistan, the UN says.
Sindh province raised the age limit for marriage to 18 in 2014, but attempts in other provinces and at federal level have so far failed. Even in Sindh, enforcement is poor.
Religious parties who claimed the new bill, which punishes child marriage with three years in prison or a 100,000 rupees (Dh2,600) fine, was against Islamic law.
Opponents unsuccessfully tried to sideline the bill by suggesting it be sent to the Islamic Ideological Council, a constitutional body set up to advise Parliament.
Senator Sherry Rehman, who proposed the bill, told legislators that such a move would be like “sending it into cold storage".
Ms Rehman told The National that a Pakistani woman died in childbirth every 20 minutes, partly because of the health risks from young pregnancies.
“Those are egregious statistics for a South Asian country with pretensions to moderate values,” she said.
Ms Rehman's bill had passed through the Senate in only a few months, which was “is record time for legislation”. But it now risks being delayed by a logjam in the National Assembly.
The UN Population Fund says marriage robs girls of their childhood and future prospects.
Girls who marry are less likely to finish school and are at greater risk of domestic violence, abuse and health problems such as harmful complications from early pregnancies and sexually transmitted diseases.
Those living in rural areas or who have little education are most at risk.
A Human Rights Watch report last year said that one in three girls in Pakistan miss out on primary school and the number was rising.
By 14, only one in eight girls are still in education because of a shortage of secondary schools, and abusive teachers, sexual harassment and discrimination.
Poverty-stricken families often marry off their young daughters because they cannot take care of them, or to protect family honour.
Pakistan ranks sixth in the world for married children, US campaign group Centre for Reproductive Rights says.
Loopholes and inconsistencies in the current laws undermine attempts to crackdown on child marriage, the centre said in a paper this year.
Child marriage and early childbearing also contribute to Pakistan's runaway population growth, experts say.
The country has grown from 84 million people in 1981 to 208 million in 2017, and the issue is considered to be one of the country's greatest challenges.
A recent World Bank report said Pakistan would be unable to lift itself out of poverty unless it sharply reduced population growth.