Until Thursday Chile was the only country in the Americas - and one of the few left in the world - to forbid divorce.

"I want to celebrate the enormous respect for this democratic exercise that was achieved on such a sensitive topic that affects the interests and values of so many different sectors," beamed the country's justice minister, Luis Bates. "This is a moment of pure joy."

Applause erupted in Chile's lower house after the clause-by-clause vote. The bill has gone through almost nine years of legislative wrangling.

Successive centre-left governments have tried to liberalise Chile's family laws, which were set out in 1884. Eighteen bills died in Congress before the lower house managed to pass one in 1995. But it lingered in the Senate until last September and, after much controversy, it passed in January. Today's vote in the lower house was its last legislative hurdle.

Chileans will still have to wait a further six months for the law to come into effect and allow them to get a divorce.

It has been a long road, and one fraught with opposition from key actors in Chilean society.

"They should have approved this ages ago," said Cecilia Muñoz, a separated young mother. "There are many unhappy families that need this. The church is what has stood in the way."

Chile is viewed as the most conservative country in Latin America. The Catholic church has been at the forefront of resistance to divorce legalisation. It launched a television advertising campaign and lobbied hard against the bill, even threatening ex-communication to Catholic parliamentarians who voted in its favour.

Father Jaime Fernández, of the Family Vicariate of Santiago, said this bill reflected a wave of change that was doing away with traditional societal values.

"To us, these laws seem like a great social danger," he said.

The rightwing senator Hernán Larraín said the state had opened a Pandora's Box that would mean more broken families. He pointed out that only about 15% of Chilean marriages end in separation (a further 10% end in annulment). But he said there was not one country where divorce was legal and the rate was lower than 30%.

"Countries like the US have a 50% rate of divorce, for a first marriage," he said.

"But two out of three marriages in a second marriage will divorce. So the trouble with divorce is that it brings more divorce."

Opinion polls show 73% of Chileans are in favour of divorce, 25% oppose it, and only 2% are undecided.

But supporters say this bill is a victory for the masses against the powerful minority aligned with the church.

Congresswoman María Antioneta Saa, a member of the Party for Democracy which is part of the ruling leftwing coalition, introduced the divorce bill in November 1995.

"I would say that, more than in civil society, the opposition has been in political society, and in the spheres of power, and well, the first force to deny and resist is the Catholic church," Ms Saa said.

"But I would say that our society is one that is rapidly opening up. The effects of globalisation are huge.

"Today the problems of this conservative society are being exposed. People want to be happy and they fight for their rights."