Nina Schick is a European political analyst and consultant based in Berlin. The opinions in this article belong to the author.

(CNN) Were Hillary Clinton being inaugurated into the world's most powerful office Friday , there would be no question about Germany remaining the linchpin of trans-Atlantic relations.

Berlin has become increasingly important to preserving US interests in a shaky European Union, especially with the United Kingdom now leaving the bloc

While Germany feels isolated handling the migration and security crisis, the President-elect has bashed German Chancellor Angela Merkel over what he calls her "catastrophic" refugee polices and accusing the EU of "being a vehicle for Germany."

American dedication to democratic values, freedom and anti-authoritarianism have traditionally been much admired in Germany -- especially given the role the United States played in rebuilding Germany from the ashes of World War II, and with the Cold War still engrained in living memory.

But German public sentiment has been becoming increasingly critical of the United States. Already under President Barack Obama's tenure, Germans felt disappointed by the divergence on commitments to climate change, human rights, equality and environmental sustainability. When Obama was elected on his euphoric platform of "hope and change," there was tremendous optimism he would be able to remold the United States to be more in line with German values. This did not come to pass.

A turning point came in 2013 when Germans learned that the National Security Agency had carried out massive surveillance in EU member states, including tapping Merkel's phone . In a country that is deeply suspicious of state monitoring there was huge public backlash. A Bundestag committee was set up to review the explosive revelations.

JUST WATCHED Merkel or Putin: Trump called it a draw Replay More Videos ... MUST WATCH Merkel or Putin: Trump called it a draw 01:09

This growing anti-Americanism also helps explains the fervent opposition to the Transatlantic Trade and Investment Partnership, or TTIP, the proposed EU-US free trade deal. Though Trump's election means that the agreement is effectively dead in the water, it is striking that opposition to it in Germany is so strong -- even though the country is Europe's biggest exporter and a huge beneficiary of global trade.

Against this backdrop, Trump's elevation to the White House is truly the stuff of German nightmares. German voters cheered on Merkel as she reminded the President-elect upon his electoral victory that Germany will continue to cooperate with the United States based on the values of "democracy, freedom and respect for the law and the dignity of man, independent of origin, skin color, religion, gender, sexual orientation or political views."

Irrespective of public opinion, however, German politicians and Merkel -- who looks set to win her fourth term in office later this year -- know they will have to pursue a close working relationship with the United States, even if through gritted teeth.

As an exporting nation, maintaining these links at a time when economic nationalism is the new vogue (and one Trump espouses) will remain a top priority for Berlin. Trump's threat to slap a 35% US import tariff on German cars will have sent alarm bells ringing.

Follow CNN Opinion Join us on Twitter and Facebook

Moreover, with questions surrounding the US commitment to NATO at a time when Russian President Vladimir Putin's particularly boisterous brand of nationalism is not only threatening the Eastern states of the EU, but the geopolitical world order, Germany knows it cannot afford to lose its ally, especially given its own reluctance for military intervention.

The big challenge for Merkel is to juggle these needs in a way acceptable to the public as the German electorate is not bound to get over its anti-Trump trauma anytime soon.

With the additional tests of the eurozone, the migration crisis, Brexit and a resurgent Russia, she will have her hands full.