Prime Minister Shinzo Abe agreed Tuesday with German President Frank-Walter Steinmeier to seek to implement a free trade agreement between Japan and the European Union as soon as possible.

"Japan and Germany will continue to hold the flag of free trade high," Abe said in a joint news conference after meeting with Steinmeier in Tokyo.

The German president said the trade liberalization deal will be a foundation for encouraging exchanges between Japan and Europe.

Japan and the European Union, which includes Germany and 27 other member countries, concluded their negotiations on the pact in December to create one of the world's biggest economic blocs. They are seeking to sign and ratify the deal as early as 2019.

Abe also said Japan and Germany shared a need to cooperate closely in the face of escalating tensions in East Asia, including threats from North Korea's nuclear and missile development.

Steinmeier visited Japan four times as foreign minister and stopped in Tokyo en route to South Korea, where he will attend the opening ceremony of the Pyeongchang Winter Olympics on Friday. This marked his first trip to East Asia since he took his current post in March 2017.

The president of Germany is stipulated as the head of state by law, but has a ceremonial role effectively without political power. The chancellor — Angela Merkel since 2005 — is the nation's political leader and head of government.