Image copyright Getty Images Image caption A Hindu bride prepares for her wedding in Karachi, Pakistan, 2015

Pakistan has passed a bill which formally recognises Hindu marriages in law for the first time.

The bill enshrines the conditions for a valid marriage, and provides for official documentation that can be used to verify marital status.

The Muslim-majority country has about 3.8 million Hindus, or some 2% of the population.

The bill, which applies only to certain regions, has now been sent to the president to be signed into law.

As part of the formal regulation, the act sets the conditions for a valid Hindu marriage within the country.

They include valid consent, both participants being over the age of 18 and a ban on polygamy.

However, the ban on multiple wives will not apply "where a living female spouse cannot conceive a child and [is] medically declared to be so".

The bill also details the circumstances for separation or divorce, and gives formal legal validity to all existing Hindu marriages.

Image copyright Reuters Image caption Pakistan's Hindus have never had any legal framework to register their unions

The law will only apply in three provinces - Punjab, Balochistan and Khyber Pakhtunkhwa - as well as the capital territory around Islamabad. Local authorities in these areas have already passed resolutions to accept the regulations.

Sindh province - which has a particularly high concentration of Hindus - has introduced its own regulations.

The new national bill retains a controversial clause from the Sindh regulation, which allows termination of the marriage if either person converts to another religion.

The bill was passed after a lengthy debate. It was first approved by the country's national assembly last year but later amended by the senate. The modified bill was then sent back to the assembly for re-approval.

It is expected to receive presidential assent and become law within the week.

Pakistani Hindus have long complained of discrimination and religious persecution, and many have fled across the border to India to escape it.

Since 2011, more than a thousand Pakistanis have been granted Indian citizenship, the majority of whom are Hindus.