A screen shot from Sunday’s televised debate between German Chancellor Angela Merkel and her main opponent, German Social Democrat Martin Schulz. (AP/AP)

With three weeks to go before Germany decides whether to give Chancellor Angela Merkel another four years in office, she faced off Sunday night in a debate with her main rival that was billed by broadcasters as a duel but at times better resembled a duet.

The 90-minute session — the only such debate of the campaign — featured an entirely civil exchange of ideas between Germany's leader for the past dozen years and the man who wants her job, Martin Schulz. 

On issue after issue — including refugees, the economy and, of course, President Trump — the pair expressed occasional mild disagreement but largely refrained from serious attacks. 

Trump himself received far more criticism than either candidate unloaded on the other. Schulz, who leads Germany's center-left Social Democratic Party, said the U.S. president has "brought the world to the edge of a crisis" and cannot be trusted to resolve the standoff with North Korea. 

Merkel, invited by a moderator to cite the values she shares with Trump, did not directly answer, and instead referred to climate change and responses to the race-fueled violence in Charlottesville as areas where there are "very clearly major differences." 

On North Korea, which conducted its sixth nuclear test early Sunday, she said that "peaceful resolution is the only way forward" — a clear departure from Trump's position that all options, military included, are on the table. 

Journalists watch the televised debate between Merkel and Schulz in Berlin. (John MacDougall/AFP/Getty Images)

Sunday's debate came as Merkel entered the homestretch of a race that she and her center-right Christian Democratic Union have comfortably led for months. Polls show her party winning about 40 percent of the vote, which would put her in a commanding position to form another government — her fourth. 

Schulz's party has polled well behind — in the low 20s — and has struggled to differentiate itself from Merkel's CDU after four years as its coalition partner. Another grand coalition between Germany's two biggest parties is among the possible post-election scenarios following the Sept. 24 vote.

Earlier in the year Merkel had faced major questions over whether she would be able to survive a two-pronged assault, with Schulz attacking from the left even as she confronted a vigorous challenge from her right flank in the form of the upstart Alternative for Germany (AfD) party

But both challenges have faded, and Merkel has succeeded in running a low-risk campaign that focuses on her achievements in guiding Germany's prosperous economy while sidestepping thornier questions about the country's future. 

Sunday's debate largely allowed her to stick to that script. Schulz, the former president of the European Parliament, was widely seen as needing a major victory in the debate to upend the race. But quick-reaction polls conducted by broadcasters suggested that he didn't get it, with viewers saying she was more credible and likable. 

In a debate that covered a range of topics — but was notable for what was left out, including Brexit, Russia and the future of the euro — Schulz repeatedly argued that he would have done what Merkel did, just more successfully.

On perhaps the most controversial episode of Merkel's tenure — her handling of the refugee crisis — Schulz insisted that he would have worked more closely with European allies. 

Merkel replied that she tried but was rebuffed and that she stands by her decisions. 

On the economy, Schulz called for a fairer system. "Germany is a prosperous country," he said, "but not everyone in the country is prosperous." 

Merkel pointed to unemployment rolls that have been cut in half since she came to office, along with rising wages. 

The fact that Schulz's party has governed alongside Merkel left him little room to maneuver. At several points, Merkel was able to blunt Schulz's critiques by noting that his own party had supported her. 

The relative harmony of the television studio was not matched online, where Germany's smaller parties vied for attention after being left out of the debate. The AfD ran a live commentary in which it promised to say "the things Merkel isn't gutsy enough to say." 

Christian Lindner, leader of the pro-business Free Democratic Party, tweeted after the debate that it had left out crucial issues including "education, digitalization, euro, energy, climate, innovation, bureaucracy." 

Merkel said in her closing statement that she was dissatisfied with the issues covered, and she listed the challenges facing the country before adding with a reassuring smile: "I believe we can manage it toget­her."

No one asked her how.

Luisa Beck contributed to this report.