Maltese citizens will be able to divorce in their own country after MPs overwhelmingly voted to allow it, ending sharp debate on the issue on the predominately Catholic country.

The law takes effect in October, after Malta's president is expected to sign it. Malta was the only European Union member without divorce legislation.

Up to now, Maltese citizens could only obtain divorce abroad. In the last 30 years, 785 couples divorced this way, with numbers gradually rising from seven in 1981 to 47 in 2010.

Parliament acted on Monday after nearly 53% of voters said yes to legalising divorce in a referendum on 28 May. The vote was a blow to the ruling Nationalist party, which had opposed divorce ahead of the poll.

The bill was approved in its entirety during the last stage of the parliamentary process. The vote was passed with 52 votes in favour, 11 against and five abstentions, while one MP was absent.

Nineteen Nationalist MPs approved the legislation, going against their party's official stand.

The prime minister, Lawrence Gonzi, voted against the bill, arguing that the introduction of divorce legislation would weaken the family structure in Malta.

Gonzi had also voted no on an earlier vote on 13 July, leading the opposition Labour party to call for his resignation on grounds he was not respecting the people's will.