The Government has passed legislation for the first time allowing for abortion in limited circumstances.

Shortly before 12.30am, TDs voted by 127 to 31 in favour of the Protection of Life During Pregnancy Bill.

Of the 165 proposed amendments, only those proposed by Minister for Health James Reilly were accepted, which led to criticism from Opposition TDs.

The landmark legislation enshrines a woman's right to a termination if her life is at risk, including from suicide.

The bill will begin its passage through the Seanad on Monday afternoon.

The schedule proposes that second stage will be dealt with on Monday and Tuesday, and committee stage on Wednesday and Thursday.

The report and final stages are to be covered on the Monday and Tuesday of the following week, 22 and 23 July.

If there are no amendments to the legislation, it will then go to President Michael D Higgins for signature.

However, if the Upper House does pass amendments, the Dáil will have to be brought back from its summer recess, due to begin next Thursday 18 July, to approve or reject them.

President Higgins can then decide to sign the bill into law or, after consulting the Council of State, to refer it to the Supreme Court to check its constitutionality.

If the Supreme Court approves the legislation, its constitutionality cannot subsequently be challenged.

Donohoe to replace Creighton

The Government appointed Dublin TD Paschal Donohoe as Minister of State for European Affairs after Fine Gael TD Lucinda Creighton voted against the Government and resigned as junior minister.

She told journalists later she had not wanted to oppose the measure, but could not support a bill that was based on flawed logic and no medical evidence.

She said she would be resigning from Government, but would not stand as an independent in the European elections and had no interest in any new party.

Ms Creighton was one of only five TDs to break Government ranks.

Mr Donohoe said he hopes the five TDs would play a role in the party in the future.

Speaking on RTÉ's Today with Pat Kenny, he said he was "humbled beyond words" to be appointed and was told of the decision in the early hours of this morning.

He said he felt "very much for Lucinda across the period".

Mr Donohoe also said he would have voted for the bill even if there had been no party whip.

He agreed with comments from Minister for Transport Leo Varadkar who has said he would welcome a move by President Higgins to refer the bill to the Supreme Court, which would clarify any issues relating to its compliance with the Constitution.

Speaking earlier, Tánaiste Eamon Gilmore said he regretted that Ms Creighton could not vote for the bill.

He paid tribute to Ms Creighton's work in the Department of Foreign Affairs.

Mr Gilmore said it was expected that all Government TDs "and of course particularly office holders" would vote for the legislation.

Fine Gael TD Regina Doherty said the decision of the five TDs to force their expulsion from the party over their failure to vote for the bill would be a loss to Fine Gael.

She said Ms Creighton was correct to stand by her personal convictions when she voted against the bill.

However, Ms Doherty said that Ms Creigton's decision was "no different" than each TD in the Dáil who made a decision on whether to support the bill or not.

Peadar Tóibín has also been suspended from Sinn Féin for six months for not supporting the bill.

The Government had a comfortable majority, but Fianna Fáil's Michael Moynihan, who had supported the measure earlier, later changed his vote because he said he had hoped for changes that had not materialised.

The President of the High Court yesterday refused to grant an injunction to prevent a vote on the bill.

The application taken by Jane Murphy may be brought before the Supreme Court.

Abortion legislation debate as it happened

Dáil Bar open until 5am during debate

There have been calls for the Members Bar at Leinster House to have its opening hours shortened.

It follows revelations that the bar stayed open until 5am earlier this week as the abortion legislation was going through the Dáil.

There are two bars in Leinster House.

One for visitors has normal pub opening hours however, the Members Bar - which caters for TDs and Senators - remains open for about an hour following the end of Dáil business.

Professor Joe Barry from Alcohol Action Ireland, said it sounds strange that a bar would remain open at the same time that politicians are debating important legislation.

Independent TD Finian McGrath said that the Members Bar should close at the same time as other pubs.

It's understood that there are no plans to change the arrangements around the opening hours of the Members Bar.

A spokesperson for the Houses of the Oireachtas said that a freedom of information request is required to find out how much alcohol was sold during the abortion legislation debate.