German Defense Minister Ursula von der Leyen was narrowly elected president of the European Commission on Tuesday after winning over sceptical lawmakers.

The 60-year-old conservative was nominated to become the first woman to hold Brussels’ top job last month by the leaders of the bloc’s 28 member states, but to the annoyance of MEPs.

The European Parliament would have preferred a candidate chosen by one of its political groups, but in the end 383 members of the 751-member assembly voted for her.

She will now replace Jean-Claude Juncker as head of the EU executive on November 1, one day after Britain is due to leave the union, and serve a five-year term as head of the bloc’s executive.

“The task ahead of us humbles me. It’s a big responsibility and my work starts now,” the polyglot mother-of-seven told lawmakers, thanking all members “who decided to vote for me today.”

“My message to all of you is let us work together constructively, because the endeavour is a united and strong Europe,” she said, urging capitals to nominate an equal number of men and women to her commission.

If von der Leyen had lost, Brussels faced a summer of infighting instead of preparing for Brexit, battling Italy over its debt and confronting Hungary and Poland over their alleged threats to European law and values.

Instead, she won, but only narrowly.

And Poland’s governing PiS party – which is facing EU action over rule of law issues and is reluctant to adopt rapid cuts in carbon emissions – was quick to remind her that her majority relied on their support.

In Brussels, officials privately admitted that the numbers were weaker than hoped, but said they had pushed on with the vote to seal the deal before the nominee was forced to make more concessions.

 ‘A majority is a majority’

At a news conference after the vote, von der Leyen played down the narrowness of her win, noting that a “majority is a majority” and acknowledging that some had opposed the nomination process.

“Two weeks ago I didn’t have a majority because no one knew me. There was a lot of resentment because I wasn’t a lead candidate,” she admitted, adding that she was happy to have built a majority so quickly.

“It’s a good base to start with,” she said. The veteran minister will head briefly to Berlin on Wednesday to say farewell to her government and the German armed forces, then return to work on building an administration.

– Agence France-Presse