Prime Minister Shinzo Abe and U.S. President Barack Obama have exchanged tweets in a sign of their closer personal ties following Abe's official visit to the United States last week.

"Barack, thank you for everything, including Lincoln Memorial tour, Yamaguchi sake and haiku — Shinzo," Abe said on the Twitter account of the prime minister's office.

Obama responded on the White House account, "Thank you for a historic visit. The U.S.-Japan relationship has never been stronger. Mata chikai uchi ni (See you soon)."

During Abe's visit, Obama surprised tourists in Washington when he took Abe to the Lincoln Memorial building for a private walk. At a banquet for Abe, Obama recited a haiku poem he composed and offered sake made in Abe's home prefecture of Yamaguchi.

Abe held talks with Obama last Tuesday and made a speech at a joint session of Congress on Wednesday, becoming the first Japanese prime minister to do so.

He also visited Boston, San Francisco and Los Angeles to meet with business leaders and local communities.