Costa Rica's highest court has blocked a referendum on gay civil unions from going forward, the AP reported.

The Constitutional Court ruled Tuesday that the issue should be decided by the legislature and not the public. In its 5-2 decision, the court said the rights of gay men and lesbians must be protected.

The effort was organized by four lawyers, who collected more than 150,000 signatures to place the issue before voters. Many of those petitions were passed around at churches.

The Roman Catholic Church had strongly backed the measure in an effort to thwart the government from legalizing gay unions, which the Costa Rican parliament has considered since 2006. Supporters believed an overwhelming number of voters would vote against gay civil unions in the Catholic stronghold.

Costa Rica's newly-elected President Laura Chinchilla has called such rights “not a priority.”

The referendum was scheduled to be held on December 5, when Costa Rica also is holding municipal elections.

Defeat at the ballot box would have only ended the hopes of the civil unions bill from becoming law.

Gay rights advocates said they would press forward with a cohabitation partnerships bill, which offers similar rights and enjoys broader support, if voters had killed the civil unions bill.