Angela Merkel has moved closer to a fourth term as German chancellor after her CDU party voted overwhelmingly in favour of renewing a coalition with the Social Democrats (SPD).

At a special party conference in Berlin on Monday, Merkel also introduced her choice of new cabinet members, demonstrating a younger, more female team than at any time during 12 years in office. CDU delegates elected Annegret Kramp-Karrenbauer, tipped as Merkel’s successor, as CDU general secretary.

They also voted 975 to 27 in favour of a grand coalition deal that was shaped last month. Before the vote, Merkel had appealed to delegates to recognise the urgent need to “pave the way for a stable, capable government” five months on from the general election.

The party’s vote could be rendered null and void, however, should a postal vote of the SPD’s 464,000 members go against the deal. The results are scheduled to be announced on Sunday.

Merkel was given a five-minute standing ovation on Monday after a near hour-long speech in which she called for solidarity and new beginnings, and examined the reasons for the CDU’s worst general election results since 1949.

She sought to win back delegates’ support after threats of a rightwing rebellion within the party over her leadership, which many blame for the poor electoral performance. There has also been considerable disgruntlement that key posts such as finance minister will go to the SPD and interior minister to the CDU’s Bavarian sister party, the CSU.

Merkel surprised her critics by appointing Jens Spahn, one of her most outspoken critics, to her cabinet, having in the past seen off male rivals by sacking them. Her decision to bring Spahn, who at 37 is by far the youngest cabinet member, into the fold has been seen as a tactical move.

A conservative who has been withering in his attacks on Merkel for what he has called her “social democratisation” of the party, Spahn will run the health ministry, a tricky role because of the demands that will be placed on him to cut costs while keeping the powerful medical lobby on side.

Profile Who is Jens Spahn? Show Hide Germany's 'anti-Merkel' gunning for the top job Jens Spahn, who has been tipped as a future German leader, is currently one of Chancellor Angela Merkel's loudest critics within her own party. The 37-year-old known as the "anti-Merkel" was this week tapped to become Germany's new health minister – a promotion widely seen as an attempt by Merkel to placate the conservative wing of her Christian Democratic Union (CDU) party, which felt left behind as she charted an ever more centrist course in recent years. Openly gay but staunchly conservative, Spahn is fiercely opposed to Merkel's open-door refugee policy, and has advocated a sharp conservative shift to coax back voters from the far-right AfD, which garnered nearly 13 percent in the September election. He has called for a cap on migration, a burqa ban and has railed against imams in Germany funded by "foreign actors".

Photograph: Stefanie Loos/AFP

A commentary in the newspaper Mitteldeutsche Zeitung called Merkel’s decision to embrace her opponent her best opportunity to tame someone who has “repeatedly sought to saw at the legs of her throne”.

The leftwing newspaper TAZ asked whether her most dangerous opponent would succeed in his mission “end up as fish food in the shark pool”.

Other newcomers to Merkel’s cabinet include Julia Klöckner as agricultural minister and Anja Karliczek, an unknown politician, as education minister. Ursula von der Leyen and Monika Grütters retain their posts in defence and culture respectively. In a nod to those who have called for new blood in an effort to revive the CDU’s fortunes, the 63-year-old Merkel noted that she will be the oldest member of her government.

Helge Braun, who has a reputation as a loyal civil servant, is to become Merkel’s chief of staff, arguably the most influential post of all. He replaces Peter Altmaier, who will move to the economic affairs post.

Commentators have suggested that Merkel will increasingly take a back seat over the future direction of her party as she continues as chancellor for the next four year, though it is unclear whether she will see through a full term. There is an expectation that party factions might form around either Spahn or Kramp-Karrenbauer.

Spahn has made little secret of his ambitions to become chancellor and would like to return the party to its rightwing roots in an effort to claw back the more than million CDU voters lost to the anti-immigrant populist Alternative für Deutschland in the general election. Kramp-Karrenbauer has indicated that she wants to continue on Merkel’s central course.