Independent Senator Ronan Mullen was accused of filibustering in a bid to block the bill after speaking at length throughout the debate.

On one proposed amendment alone, he spoke for more than 30 minutes and quoted the soliloquy from Hamlet.

He denied filibustering but said he had a “higher duty” to speak to his concerns over the bill.

Other senators, however, accused him of being “a bully” and a “dictator” and making a “mockery” of the Seanad.

In response, Mr Mullen claimed that the senators were “seeking to gang up” on him.

All the political parties in the Seanad – Fianna Fáil, Fine Gael, Labour, the Greens and Sinn Féin – supported the bill, making it a certainty to pass.

But Mr Mullen and three former Fianna Fáil senators – who lost the party whip earlier this week as a result of opposing the bill – voted against it.

Among other things, they unsuccessfully sought a “conscience clause” in the legislation that would have allowed registrars to refuse to conduct a civil partnership if they had moral objections.

“There are people who have a profound religious objection to public state recognition of same-sex partnerships, and this does not make them homophobic as has been claimed in some quarters,” Mr Mullen said.

But supporters of the bill said such a clause would provide a licence to discriminate.

Independent Senator David Norris added that, as he understood it, not a single register in the state had made any formal objection to the legislation.

“Therefore, Senator Mullen… having interpreted Shakespeare’s mind, now represents the registrars as well. There seems to be a slight touch of megalomania there,” Mr Norris said.

Fine Gael senator Eugene Regan, meanwhile, said one of the amendments proposed by opponents of the bill simply boiled down to “a hostility towards gay people”.

Mr Mullen called on Mr Regan to withdraw the “outrageous” remark.

The debate was finally cut short at 6pm and the Seanad passed the legislation by 48 votes to four.

Having already been passed by the Dáil, it now goes to the President for signature.

Justice Minister Dermot Ahern said the passage of the bill represented a good day for politics.

“It’s a proud day for my party that we have been able to bring forward this very progressive piece of legislation,” he said.

Green leader John Gormley similarly welcomed the bill’s passage.

“These progressive new laws are of real importance to the gay and lesbian citizens of our country, and I am delighted that Ireland has taken an important step forward today towards an inclusive, tolerant and equal society.”