On 30 May 2005, Merkel won the CDU/CSU nomination as challenger to Chancellor Gerhard Schröder of the SPD in the 2005 national elections. Her party began the campaign with a 21-point lead over the SPD in national opinion polls, although her personal popularity lagged behind that of the incumbent. However, the CDU/CSU campaign suffered when Merkel, having made economic competence central to the CDU's platform, confused gross and net income twice during a televised debate. She regained some momentum after she announced that she would appoint Paul Kirchhof, a former judge at the German Constitutional Court and leading fiscal policy expert, as Minister of Finance.
On the eve of the election, Merkel was still favored to win a decisive victory based on opinion polls. On 18 September 2005, Merkel's CDU/CSU and Schröder's SPD went head-to-head in the national elections, with the CDU/CSU winning 35.2% (CDU 27.8%/CSU 7.5%) of the second votes to the SPD's 34.2%. The result was so close, both Schröder and Merkel claimed victory. Neither the SPD-Green coalition nor the CDU/CSU and its preferred coalition partners, the Free Democratic Party, held enough seats to form a majority in the Bundestag. A grand coalition between the CDU/CSU and SPD faced the challenge that both parties demanded the chancellorship. However, after three weeks of negotiations, the two parties reached a deal whereby Merkel would become Chancellor and the SPD would hold 8 of the 16 seats in the cabinet.
On 22 November 2005, Merkel assumed the office of Chancellor of Germany following a stalemate election that resulted in a grand coalition with the SPD. The coalition deal was approved by both parties at party conferences on 14 November 2005. Merkel was elected Chancellor by the majority of delegates (397 to 217) in the newly assembled Bundestag on 22 November 2005, but 51 members of the governing coalition voted against her.
In recognition of the importance of China to the German economy, by 2014 Merkel had led seven trade delegations to China since assuming office in 2005. The same year, in March, China's President Xi Jinping visited Germany.
The first cabinet of Angela Merkel was sworn in at 16:00 CET on 22 November 2005. On 31 October 2005, after the defeat of his favoured candidate for the position of Secretary General of the SPD, Franz Müntefering indicated that he would resign as party chairman, which he did in November. Ostensibly responding to this, Edmund Stoiber (CSU), who was originally nominated as Minister for Economics and Technology, announced his withdrawal on 1 November 2005. While this was initially seen as a blow to Merkel's attempt at forming a viable coalition, the manner in which Stoiber withdrew earned him much ridicule and severely undermined his position as a Merkel rival. Separate conferences of the CDU, CSU, and SPD approved the proposed Cabinet on 14 November 2005. The second Cabinet of Angela Merkel was sworn in on 28 October 2009.