As the 11th vote of the day was called at 11.36pm, the Minister for Health Simon Harris paced the floor of the Dáil chamber, typing furiously on his phone.
“The Minister has probably staked a bit of his reputation on the timescale of this being pushed through,” Peadar Tóibín had mused just a few hours previously.
Texts were flying across the chamber.
All party allegiances had been abandoned as politicians who normally spend their days berating each other had their phones out, messaging each other to see if it was true that history would indeed be made on Wednesday night.
Anti-abortion TDs huddled in quiet conversation, as did pro-choice deputies. The atmosphere, at this point, was subdued: TDs had just overwhelmingly voted down an amendment which would set down in law the burial arrangements for a foetus after a surgical abortion.
It had been widely expected that this would be one the most contentious parts of the debate, but in the end, those in support of the legislation chose not to contribute, leaving it to Mr Harris to respond.
Independent TD Mattie McGrath said: “Let us face it, there have been horrific practices in America and elsewhere, with body parts being procured and sold for research.” He asked if Mr Harris was “in . . . hock to the abortion industry.”
“Why was it spun in the media by people who are against it that we were being savages?” Mr McGrath asked.
Mr Harris told him: “I am conscious that there are people watching this debate this evening who will have been through tragic circumstances where they lost much-loved babies. I do not believe there is any woman out there in a crisis pregnancy who needs a ministerial regulation to tell her how to grieve or how to act in a dignified manner.”
With no further contribution from pro-choice TDs, a vote was called. The amendment was defeated by 89 votes to 10. At this point, it was expected that there would be another seven long and tedious votes, potentially pushing the debate beyond its allocated time.
But, in what was viewed as a surprise move, former Sinn Féin TD Carol Nolan decided not to seek a vote on her last few amendments, clearing the way for the most important vote of the night.
Minister of State Seán Kyne informed the chamber that they would sit until the Bill was passed, regardless of what time it was. "We will have to put out a search party out for the Fine Gael deputies," said Fianna Fáil's Thomas Byrne, possibly referring to the fact that some Government TDs were flitting between the chamber and a Christmas reception being held nearby for members of the press.
Sinn Féin leader Mary Lou McDonald appeared, and hot on her heels was the Taoiseach Leo Varadkar, who had been present for most, but not all, of the previous votes.
Fianna Fáil leader Micheál Martin had been in and out all night too. The question was put “that the Bill do now pass” and all heads swivelled to the oversized screen above the press gallery which showed in real time who was voting in favour and who was voting against.
The Taoiseach was the first to take out his phone and snap a quick photo of the screen which showed that the Bill had passed 90 votes to 15, with 12 abstentions.
On the Fianna Fáil backbenches, where many of the deputies had taken a strong anti-abortion stance throughout the campaign, with some even voting against a referendum being held at all, there were stony faces.
As the final result was read out, the Tánaiste Simon Coveney turned in his chair to congratulate Mr Harris who sat behind him, as the Taoiseach joined in and shook the Minister's hand. As TDs rushed out the chamber, eager to escape home, the Taoiseach remained in the chamber and crossed the floor to shake the hand of People before Profit TD Bríd Smith. The moment was fleeting, with both beaming at each other before leaving the chamber in emptiness.
The Bill is now before the Seanad, and the Government will be hoping that no amendments pass, or else the spectre of more divisive and protracted Dáil sittings loom.