For the famously reserved commander in chief, German Chancellor Angela Merkel has become his closest global partner, an alliance-turned-friendship forged by mutual political interests and parallel personalities.

Obama arrived in Hanover, Germany, on Sunday to lend Merkel his backing as she faces political blowback over her stance on refugees fleeing war in Syria, a position Obama praised as a matter of moral fortitude.

"She's on the right side of history on this," Obama said alongside his German counterpart Sunday, praising Merkel for confronting some "very tough politics" in opening her country's borders to nearly a million migrants last year.

"She is giving voice, I think, to the kinds of principles that bring people together rather than divide them, and I'm very proud of her for that, and I'm proud of the German people for that," Obama said.

At the same time, Obama is hoping his strongest European friend can help sway skeptical fellow leaders to scale up their efforts to counter ISIS, particularly in implementing stronger counterterror programs to track suspected extremists. He also is looking for her support in hammering out a U.S.-European Union trade pact.

If Obama is successful in his European pursuits this week, it's because the two leaders have formed something rare for Obama: a genuine international friendship that both have leveraged to their own advantage. That rapport, analysts say, has led Germany to assume the pre-eminent role in U.S.-Europe ties previously held by France or the United Kingdom.

"You feel increasingly the center of the trans-Atlantic relationship rests in many ways on the Berlin-Washington axis a little bit more than it has in the past. And I think Obama and Merkel are responsible for that because of that tight relationship," said Julianne Smith, the director of the Strategy and Statecraft Program at the Center for a New American Security, and a former deputy national security adviser to Vice President Joe Biden.

Officials say similarities in each leader's personality and disposition have led to a bond that's withstood a litany of challenges during their tenures. Early in Obama's administration, Merkel reportedly expressed doubts about the young president.

"She dislikes the atmospherics surrounding the Obama phenomenon. ... It's contrary to her whole idea of politics and how to conduct oneself in general," then-Secretary of State Hillary Clinton was told in an email from her confidant Sidney Blumenthal. He was citing information from a former U.S. ambassador in Germany.

Later, when it was revealed that the American National Security Agency was monitoring Merkel's cell phone, the furious response reflected Germans' worst fears of overzealous American surveillance. The situation wasn't resolved immediately; at one point, Merkel ejected the CIA station chief in Berlin after it was alleged the spy agency was recruiting German officials.

Finally, Obama's chief of staff was dispatched to the German capital to resolve the tensions, a rare overseas mediation that was effective in cooling tempers.

So too have Obama and Merkel been sharply at odds over austerity versus growth models in reviving the global economy, a disagreement that persists even though they have so far staved off a global depression.

But both are cerebral realists, each relatively cold-eyed about the challenges their countries face, and their friendship emerged from those disagreements intact.

"For me, the future with the President is much more important than the past right now," Merkel declared Sunday through an interpreter.

During last year's Group of Seven talks in Bavaria, it was apparent both had put aside any lingering resentments when Obama greeted Merkel with a hug and kisses on the cheek. The pair spent a sunny afternoon meandering through an Alpine village, sampling sausages and beer.

The chumminess was again on full display ahead of Obama's arrival in Hanover, where he'll sit for talks with Merkel on Sunday. A headline atop Obama's interview with Germany's Bild newspaper blared "Was ich an Merkel so mag!" -- "What I Really Like about Merkel!"

Obama was grinning widely when he met Merkel, embracing the German chancellor and kissing her on the cheek. Though she returned his hug, Merkel returned quickly to her familiar German sobriety, walking briskly along the grand courtyard of the Schloss Herrenhausen to survey troops.

Later, during their joint news conference, Obama was determined to spotlight Merkel's jocularity, even if it's her sober outlook he values in global affairs.

"This is as important a relationship as I've had during the course of my presidency. Chancellor Merkel has been consistent; she has been steady; she is trustworthy. She has a really good sense of humor that she doesn't show all the time at press conferences," Obama said. "That's why she's been such a long-lasting leader, because she watches what she says."

Merkel is a chemist by training, distinguishing her from the parade of career politicians whom Obama regularly faces in Europe and elsewhere. Obama's aides say the President appreciates Merkel's scientific approach to problems like Europe's persistent economic woes, Russia's continued provocations in Ukraine and counterterror efforts that haven't been popular at home.

It's that willingness to brave political fallout that's endeared Merkel to Obama over the long course of their parallel administrations. In Germany this week, Obama hopes to boost Merkel after her decision to open Germany for an inflow of refugees proved deeply unpopular among Germans.

U.S. officials say the decision took bravery. And while Merkel is now coming under different criticism for pushing a deal that would allow for the deportation of migrants back to Turkey, they say Obama wants to laud his friend amid the rancor.

"We do believe that Chancellor Merkel demonstrated bold leadership in responding to the refugee crisis," said Charles Kupchan, Obama's direction for European affairs. "The President wants to provide political support to her for doing so."