Barack Obama is to visit German Chancellor Angela Merkel in Berlin on his first trip to Europe since leaving office.

The former US President will travel to Germany for the launch of a summer of special events to mark the 500th anniversary of the Protestant church.

He will arrive in Germany on the same day as his successor Donald Trump is due in Brussels for a meeting with other NATO leaders – the first scheduled foreign visit for the President since taking office.

Mr Obama is due to give a speech in the German capital and take part in a discussion on democracy with Ms Merkel, who he once called his “closest ally”.

Barack Obama's best moments in the White House Show all 11 1 /11 Barack Obama's best moments in the White House Barack Obama's best moments in the White House May 19, 2009 “The President was leaving the State Floor after an event and found Sasha in the elevator ready to head upstairs to the private residence. He decided to ride upstairs with her before returning to the Oval Office,” Peter Souza Barack Obama's best moments in the White House Oct. 26, 2012 President Barack Obama pretends to be caught in Spider-Man's web as he greets the son of a White House staffer in the Outer Oval Office Peter Souza Barack Obama's best moments in the White House “A National Security staffer, Carlton Philadelphia, brought his family to the Oval Office for a farewell photo with President Obama. Carlton’s son, Jacob, softly told the President he had just gotten a haircut like President Obama, and asked if he could feel the President’s head to see if it felt the same as his.” Peter Souza Barack Obama's best moments in the White House March 21, 2010 The President, Vice President and senior staff applaud after watching on television the House vote on H.R. 4872 for health care reform, in the Roosevelt Room of the White House Peter Souza Barack Obama's best moments in the White House Dec. 3, 2009 President Barack Obama fist-bumps custodian Lawrence Lipscomb in the Eisenhower Executive Office Building following the opening session of the White House Forum on Jobs and Economic Growth Peter Souza Barack Obama's best moments in the White House Sept. 22, 2015 "The Obama family and Biden family greet Pope Francis as he arrives in the United States for the first time at Joint Base Andrews," Sept. 22, 2015. Peter Souza Barack Obama's best moments in the White House Feb. 21, 2014 President Barack Obama and Vice President Joe Biden participate in a "Let's Move!" video taping on the Colonnade of the White House, Feb. 21, 2014 Peter Souza Barack Obama's best moments in the White House Feb. 18, 2016 President Barack Obama watches First Lady Michelle Obama dance with 106-Year-Old Virginia McLaurin in the Blue Room of the White House prior to a reception celebrating African American History Month, Feb. 18, 2016 Peter Souza Barack Obama's best moments in the White House Jan. 21, 2013 "The President and First Lady wave to supporters as they ride in the inaugural parade. I had asked the President if I could ride in the presidential limousine and the President joked, 'But Michelle and I were planning to make out," Jan. 21, 2013. Peter Souza Barack Obama's best moments in the White House Barack Obama and former First Lady Michelle Obama share a private moment in a freight elevator at an Inaugural Ball, January 2009 all pics: Pete Souza Barack Obama's best moments in the White House Barack Obama rests his hand on the bible that President Lincoln used for his swear-in, being held by his wife Michelle Obama as he is sworn in as the 44th President of the United States of America Rex

He and Ms Merkel will speak on a purpose-built stage at the historic Brandenberg Gate, Berlin’s most prominent monument, which stands as a symbol of the Iron Curtain and the end of the Cold War when Germany was divided into East and West by the Berlin War.

In 2008, Ms Merkel intervened to prevent then presidential candidate Obama from delivering a speech at the Brandenberg Gate because she said she thought it would be inappropriate to use the non-partisan symbol for political purposes – although he was permitted to speak at the monument as President in 2013.

With the German general election taking place in September, Ms Merkel is facing a tough battle to win a fourth term as Chancellor and the joint appearance will be seen by some as a bid to boost her chances.

Mr Obama has previously endorsed Conservative Ms Merkel saying, “If I were German and I had a vote I’d support her” in his final visit to Berlin as President last November.

He joked that he didn’t know if that “helps or hurts”.

Tensions emerged in relations between the US and Germany after it emerged that the National Security Council had tapped the phones of Ms Merkel and other officials in the country, although the two leaders continued to enjoy an apparently warm relationship.

In contrast, Mr Trump has been publicly critical of the German Chancellor, particularly her willingness to allow refugees into the country.

President Trump met with Ms Merkel for the first time last month and is due to make his first official visit to Germany for a meeting of the G20 leaders in Hamburg in July.

He was invited to Germany – where he is a popular figure - by the bishop of Bavaria, Heinrich Bedfor-Strohm.

“President Barack Obama’s attending the Kirchentag in Berlin, which will ring in the Reformation Summer, underlines the international character of our 500th anniversary celebrations,” the bishop said in a statement.

"Anyone who is pious also has to be politically minded,“ he added. "I am looking forward to enthusiastic debates during the Reformation Summer 2017."

Mr Obama has never cited any religious affiliation before, although he was a member of a Christian community when he lived in Chicago and has said in the past that he occasionally consults the bible for guidance.