Pakistan's lower house of parliament, with rare support from the opposition, has passed a bill to give equal rights to 5 million people living in the country's tribal areas.

The legislation, pushed by the ruling party, envisages administratively merging the semi-autonomous tribal regions bordering Afghanistan into the northwestern Khyber Pakhtunkhwa province for the first time in the 70 years since Pakistan's creation.

After Thursday's approval in the National Assembly, the bill will to go to the upper house of parliament, or Senate, for endorsement there before it can become law.

Its purpose is also to abolish colonial-era laws, such as the ones that call for punishing an entire tribe if one of its members is found guilty of crime.

Pakistan gained independence from British rule in 1947.