Chancellor Angela Merkel vehemently defended her economic record and her current policies in her first parliamentary speech since announcing that this would be her last government.

Enduring a hail of mocking laughter and scorn from the far-right Alternative for Germany (AfD), Merkel led the Bundestag's budget debate on Wednesday by defending the United Nations migration and refugee pacts.

"We want reasonable conditions everywhere in the world, because otherwise, of course, people will say you only have a few countries you can go to, and try it and risk their lives," she said, during a debate that is traditionally used as a raucous free-for-all by the opposition, which is allowed to speak first. "That's why it's in our national interest that the conditions for fleeing on the one side, and for work migration on the other, improve."

In a particularly animated moment, she described how one of the aims of the UN pacts was to equalize working conditions around the world while not altering the legal guarantees inside Germany. "This pact for migration, just like the pact for refugees, is the right attempt — and we're still at the beginning — to solve global problems together at an international level," she said.

AfD: 'politics of unreason'

But the AfD's parliamentary leader, Alice Weidel, began the debate with a very different point to make. The far-right leader accused the chancellor of pursuing a "politics of division and unreason," and overspending the country's prosperity on all the wrong priorities.

"We're spending money every year to fight against the right and other ways to patronize people, but women and girls can't go out alone on the streets for fear of being attacked by so-called asylum-seekers," said Weidel in a charged opening speech.

<div class="opinary-widget-embed" data-poll="do-you-think-chancellor-angela-merkel-ha" data-customer="deutschewelleeng"></div> <script async type="text/javascript" src="//widgets.opinary.com/embed.js"></script>

Weidel also accused Merkel's administration of "waging a war against the combustion engine" and pandering to "obscure lobby groups" to the detriment of Germany's vital auto industry. In car-loving Germany, the AfD has recently made diesel bans one of its main attack lines against the government.

The AfD politician ended by dismissing the accusations of breaking party donations law by accusing the other parties of identical transgressions.

Merkel's response to Weidel was dry: "The nice thing about free debates is that everyone talks about what they think is important for the country," she said, before pausing for a generous round of applause. She went on to list all the economic markers that displayed Germany's prosperity: its nine years of growth (although 2018 threatens to be the first year in which the German economy's growth stops), its low debt levels and low unemployment.

Read more: Opinion: A cold-hearted, fearmongering AfD

The economy: energy and digitalization

Merkel also emphasized the issues she said would be decisive for the future of Germany: upgrading digital infrastructure and the future of the country's energy supply when traditional sources are threatening to destroy the climate. A key plank of the latter is the government's coal commission, which is meant to regulate the phaseout of coal power stations while offering security for the 100,000 people whose jobs depend on them.

"It's not about setting phaseout dates; it's about giving people hope and a future and preparing structural change properly in order to give us the security to say, 'Yes, we will also make our contribution to climate change,'" she said.

This was countered by the Green party's parliamentary leader Anton Hofreiter, who accused the coalition government of wasting its time on self-absorption and meeting Germany's climate targets simply by running down the domestic steel industry then buying cheap steel from China.

That theme was also taken up by the leader of the business-friendly Free Democratic Party (FDP), Christian Lindner, who welcomed the chancellor's decision to step down as party leader and said he hoped the next year would bring a fresh wind into the country because this year had been "lost."

Meanwhile, Andrea Nahles, the leader of perhaps the currently most embattled party in Germany, the Social Democrats (SPD), also made an effort to use her speech to look forward to next year, which will likely see the first European elections in the post-Brexit era. Nahles demanded a stronger Europe that would impose an international tax on major internet companies. "For us, deepening the European Union is the answer," she said.

The chancellor went on to defend the hard-fought preliminary deal that the European Union had hashed out with Prime Minister Theresa May on Britain's exit from the bloc. The major sticking point, she said, remained the border between Northern Ireland, which is part of the UK, and the Republic of Ireland, which is in the EU.

"We have placed value, and I think this is right, on the fact that Britain cannot decide unilaterally when it ends the state of the customs union, but that Britain must decide this together with the EU," she said.