Fine Gael leader Enda Kenny has been re-elected as Taoiseach in the Dáil.
He is the first Fine Gael Taoiseach to be returned to power.
The party set a deadline of midday for the fourth vote for Taoiseach since the general election.
Speaking time for members of the House on the nomination was extended twice.
Mr Kenny needed at least six votes from Independents. He secured the support of 59 deputies, with 49 voting against.
Nine Independents voted for him, along with Fine Gael: Katherine Zappone, Michael Lowry, Michael Harty, Denis Naughten, Shane Ross, Finian Mc Grath, Kevin Boxer Moran, Seán Canney and John Halligan.
Mr Kenny has received his seal of office from President Michael D Higgins at Áras an Uachtaráin.
The Warrant of Appointment signed by President Higgins for Taoiseach Enda Kenny | Image via @PresidentIRL on Twitter
He will spend the afternoon in Government Buildings - sacking, promoting and moving ministers around.
He will now name his new Cabinet, which will have the highest number of Fine Gael ministers in Cabinet ever, later this evening.
Speaking in the Dáil earlier, Mr Kenny said he commits himself and the incoming government to devise solutions to the problems facing the people.
Enda Kenny leaves Leinster House to head to the Aras. Lots of applause for the Taoiseach pic.twitter.com/lgjfpMCNvH
— Sean Defoe (@SeanDefoe) May 6, 2016
Before the vote, there was laughter in the chamber as Noel Rock stood up to nominate Mr Kenny for the 4th time.
Fianna Fáil leader Michael Martin said there was too much emphasis on water charges during the government formation talks.
And he launched an attack on the record of Labour in the last government.
Members of the Independent Alliance were not in the Dáil chamber for the start of proceedings.
They were continuing last minute talks with Fine Gael.
Sinn Féin leader Gerry Adams wondered where the 'Endadependents' were.
Clare Daly said she hadhoped there would be a second election, to put an end to what she called a "farce".
While Mattie McGrath said earlier he would not be voting for Enda Kenny this afternoon.
Kerry TD Michael Healy-Rae said he would abstain, while Cork South-West Independent Michael Collins said he would not back Mr Kenny.
While the Social Democrats voted against Mr Kenny - instead of abstaining, as they did in the last vote.
The new Cabinet?
But who will be in the next Cabinet?
There are set to be three or four ministries given out to newly-elected TDs, with possibly three or four junior ministries also.
Among those hotly-tipped for a place at the Cabinet table are Katherine Zappone, Shane Ross, Denis Naughten and Sean Canney.
Shane Ross - cabinet minister, Finian McGrath 'super junior', John Halligan junior Minister & rotation of a junior between Moran and Canney
— Páraic Gallagher (@paraicgallagher) May 6, 2016
New ministries are also set to be created.
There will be a new Minister for Hosing, Minister for Rural Affairs, as well as a new Junior Minister for Disabilities.
There is also speculation that Leo Varadkar may lose the health portfolio, and Michael Noonan will remain in finance.