BERLIN — Angela Merkel is free at last.

Liberated from the weight of responsibility that comes with being Germany’s supreme leader, Merkel, who last month signaled she would soon ride into the sunset, delivered her most feisty speech since ... maybe ever.

Standing in the well of the Reichstag chamber, ostensibly to defend her 2019 budget, Merkel trained her sights on “those who believe they can solve all problems on their own and only have to think of themselves — that’s nationalism in its purest form, not patriotism.”

The targets of her salvos, though unnamed, weren’t difficult to discern. In addition to addressing the leaders of the far-right Alternative for Germany (AfD), who were seated just a few feet away from Merkel and heckled as she spoke, Merkel directed her comments across the Atlantic.

Coming just hours after Donald Trump shocked allies with the publication of his “America First” manifesto on the Jamal Khashoggi case, Merkel could not have offered a starker contrast.

"It is in our national interest to ensure that the global conditions for refugees on the one hand, and migrants seeking work on the other, are improved" — Angela Merkel

For a leader who avoids rhetorical flourishes and typically delivers speeches with the verve of a technocrat, Merkel’s address was uncharacteristically emotional, impressing even the opposition, who responded with enthusiastic applause at several junctures.

Whether moved by what she termed our “nervous times,” or reflections on her legacy, as some commentators surmised, Merkel, for once, didn’t beat around the bush.

Her reference to “patriotism,” rare for the leader of a country where the concept still makes many wince, echoed recent comments by French President Emmanuel Macron, offering a clear gesture of solidarity with an ally who has come under harsh attack from Trump for questioning his concept of nationalism.

Merkel’s primary aim with the half-hour speech, however, was less to defend Macron than to offer a spirited defense of the global order, the foundation of Germany’s post-war rehabilitation, which Berlin worries Trump is trying to dismantle.

“Fortunately, the lesson of World War II was to create a multilateral framework,” Merkel said, adding the United Nations makes it possible “to work with one another to solve problems instead of against one another.”

Trump wasn’t Merkel’s only target. She also took aim at those in Germany, including some in her own party, who question the necessity of the U.N.’s migration pact. The non-binding agreement, intended to offer “a collective commitment to improving cooperation on international migration” by setting standards for the treatment of refugees, was approved to little fanfare by the U.N. in July. Since then, it has become a lightning rod for right-wing European populists who claim that it would undermine national sovereignty and open the door to mass migration from Africa.

While there’s no evidence for such assertions, the decision by the U.S., Austria and other countries not to support the pact has intensified the debate in Germany, where migration remains a hot-button issue.

On Sunday, Health Minister Jens Spahn, one of three candidates vying to replace Merkel as party leader, suggested the Christian Democratic Union debate the issue at its party congress next month before the U.N. convenes a conference in Morocco to adopt the compact.

For Merkel, the debate represents more than just another challenge to her controversial decision to allow more than 1 million refugees into Germany at the height of the migration crisis. Any move by her party to back away from its support for the pact would amount to an outright rebuke of her leadership.

“Just to be absolutely clear, it is in our national interest to ensure that the global conditions for refugees on the one hand, and migrants seeking work on the other, are improved,” she said.

Citing the EU’s refugee pact with Turkey, which she played a key role in negotiating, Merkel warned against thinking that migration is an issue “that one country can solve on its own.”

Though Spahn appears isolated on the question of the U.N. pact, the question of migration nonetheless looms over the succession race. Even Annegret Kramp-Karrenbauer, the CDU’s secretary-general and Merkel’s purported favorite for the top job, has pledged to revisit what happened in 2015 if elected in order to heal divisions in the party.

If Wednesday’s speech is the new Merkel, it’s a debate the chancellor is prepared for.

“The good thing about the times we live in is there are real differences again,” she said.