Pakistan has amended the country's criminal law to repeal a colonial-era law against suicide, AP reports.

The amendment, introduced by Pakistan's secular Awami Party, was approved by the upper house of parliament, three months ago.

Under previous legislation - a remnant of colonial times before 1947 that separated India and Pakistan from the former British Empire - attempted suicide was punishable by up to a year in prison, a fine or both.

Salman Sufi, a close aide to Pakistani Prime Minister Shahbaz Sharif, welcomed the amendment and said everyone in distress should be helped.

Suicide is still a crime in some countries.

More than 700,000 people committed suicide this year, according to the World Health Organization's 2019 World Suicide Report, prompting the introduction of new guidance to help countries improve suicide prevention.