Ursula von der Leyen has been re-elected for a second term as European Commission president.
Ms von der Leyen was voted in with 401 for and 284 against. There were 15 abstentions. She needed 360 votes to win.
Following the result, Ms von der Leyen posted a photo with the word "thanks" to social media platform, X.
"Five more years," she wrote. "I can't begin to express how grateful I am for the trust of all MEPs that voted for me."
In the end, the win was not as narrow as some had expected even though Ms von der Leyen has been subject to heavy criticism for her response to Israel's actions in Gaza and controversy over the sale of covid vaccines to European Union countries.
In the case of the latter, the General Court of the European Union ruled on Wednesday that Ms von der Leyen had not been sufficiently transparent with the contracts, due to redactions before they were formally published.
The newly re-elected president's European People's Party along with the centre-left Socialists and Democrats as well as the Greens group had all signalled their support for Ms von der Leyen.
Fianna Fáil's Renew Europe group also said it would support the commission president but its Irish MEPs opposed a second term.
Ms von der Leyen presided over the commission through two big crises, the covid pandemic and Russia’s full-scale invasion of Ukraine. She has won respect among heads of state and government for her staunch support of Kyiv and ability to cultivate close relationships with Europe’s allies.
Her confirmation for another term as the commission’s chief will come as to a relief to many EU capitals, which have sought continuity in Brussels amid political uncertainty in some member states, the ongoing war in Ukraine and concerns about the possible impact of the upcoming US election.
But Ms von der Leyen has also come under criticism from parts of the political spectrum.
Some politicians argued that her commitment to the bloc’s green deal and to defending rule of law standards has been inconsistent, and that her dealings with third countries on migration policy did not provide for sufficient safeguards on human rights. Others, in particular on the far right, see Ms von der Leyen as too centrist, criticising her over the green deal and other core policies.
Ahead of the vote, Lynn Boylan was the only Irish MEP to speak during the debate using her time to address Ms von der Leyen's stance regarding Palestine.
"When you declared Europe stands with Israel, when you stood shoulder-to-shoulder with Netanyahu, you greenlighted this genocide," Ms Boylan said.
"The double standards, the hypocrisy with how you reacted to the conflict in Ukraine compared to Gaza has done untold damage on the world stage to the European Union."
Recently elected Independent MEP Ciaran Mullooly had remained tight-lipped on what way he intended to vote, holding negotiations up until Wednesday night.
In the end, Mr Mullooly said he could not support Ms von der Leyen as he said she "did not address the trade agreement or propose any tangible measures to help stop the appalling violence, death, and destruction in Gaza".
Indpendent Luke Ming Flanagan shared Ms von der Leyen's post on X with text that said: "I can't begin to express how disgusted I am."
Mr Flanagan also voted against the president due to her stance on Palestine, saying that she has allowed the deaths of 186,000 men, women and children in Gaza through starvation, famine and bombings.
Leader of the Social Democrats Holly Cairns said the vote was a missed opportunity to restore credibility to the EU and means there will be little or no meaningful action by the EU against Israel.
"The Irish Government’s support for a second term for Ursula von der Leyen is completely at odds with its strong words of condemnation of Israel’s brutal military assault in Gaza – and Ireland’s official recognition of the State of Palestine," said Ms Cairns.
Fine Gael MEP Seán Kelly welcomed Thursday's result saying that Ms von der Leyen rose to some very difficult challenges during her first term.
"Her programme for the next five years look hopeful, as she promises to tackle some of the greatest challenges that Ireland faces currently, from housing to red tape for farmers," Mr Kelly said.
- additional reporting from The Guardian