MEPs narrowly backed Ursula von der Leyen as the next President of the European Commission on Tuesday, making her the first woman to hold Europe’s top job.
Germany's defence minister was confirmed as the successor to Jean-Claude Juncker with only 9 votes more than the minimum after a much-criticised process and weeks of political uncertainty.
Her nomination as a compromise candidate by EU leaders as part of horse-trading has angered some politicians who had put forward their own candidates.
Out of the 733 available votes, she needed 374 to win Tuesday's confirmation, and in the end won 383 against 327 with 22 abstentions — well short of the 420 achieved by her predecessor.
"The confidence you placed in me is confidence you placed in Europe," she said after the result was announced.
"The task ahead humbles me," she said. "My work starts now. Let us work together constructively."
Earlier, in a bid to win MEPs' support, she set out her priorities for the next five years, should she be confirmed in the job.
What did she say in her speech?
On Brexit: She regretted but respected the referendum vote and is open to extending the UK's departure date beyond October 31.
On the environment: She promised a "green deal" for the EU in her first 100 days in office and said she wanted Europe to be first the carbon-neutral continent by 2050.
On fiscal matters: She had earlier pledged A more growth-oriented fiscal policy and taxing big tech companies
On gender equality: She made a point of emphasising she could become the EC's first female leader and committed to having an equal number of men and women serving her.
How did MEPs react?
European Greens 'not moved' by von der Leyen's speech
Ska Keller, the leading candidate for the European Greens, tweeted that von der Leyen's speech was "nice" but wasn't concrete enough on environmental issues.
Co-leader of the group Philippe Lambert said the Greens weren't persuaded by von der Leyen's promises.
The main message in his speech was that his party would not be supporting her nomination.
“There was no word” on issues like biodiversity or “the favourable treatment given to investors,” says Lamberts. “Where a change of orientation is needed, you propose here and there some bowing, incremental changes and a lot of vagueness.”
Wearing a hoody with names of big companies such as McKinsey, Accenture and PwC, Nico Semsrott, a Green MEP, stood up and requested for "the disclosure of financial interests" and "conflict of interest" to a silent room.
"VDL is not the answer"
The Confederal Group of the European United Left/Nordic Green Left tweeted its disapproval of von der Leyen with a cartoon that pictures the nominee being pushed towards a door with the EU logo by cartoons of military man, a bank, and big enterprises.
Martin Schirdewan, a leader of the coalition, rejected all of von der Leyen's proposals in his speech, particularly her support for an EU army.
“Unfortunately we won't be able to support you this evening,” he said.
'Communist and fanatic'
Leader of the Brexit Party Nigel Farage accused the nominee of pursuing a communist agenda as well as being a fanatic of building a European army.
"I think we can do without you, Mr Farage," responded von der Leyen to the Brexit Party leader's attack.
Far-right against von der Leyen
MEP Jörg Meuthen from the far-right Identity and Democracy group said his party would not be supporting von der Leyen, to which she answered: “I am relieved that I will not get a single vote from you.”
Support from Vestager, Weber, and Timmermans
Von der Leyen has received public support from European Commissioner for Competition Margrethe Vestager who tweeted her speech was "strong, warm, and balanced".
Manfred Weber, who was the EPP nominee for Commission president, pledged his group's full support for von der Leyen.
Weber added that what had happened had already "caused damage" and urged MEPs to not cause "further damage".
The social democrat nominee for EU's top job Frans Timmermans tweeted his support for von der Leyen.
The socialists delayed their decision to the afternoon, when they agreed to endorse her.