Prime Minister Shinzo Abe on Wednesday explained his impending resignation and called for continued cooperation in separate talks with Canadian counterpart Justin Trudeau and British premier Boris Johnson, Japan's Foreign Ministry said.

In a phone call with the Canadian prime minister, Abe called their agreement to take concrete steps toward a free and open Indo-Pacific a "great achievement," while Trudeau thanked Abe for his leadership and role in strengthening bilateral ties, according to the ministry.

"You'll always have a friend in Canada," Trudeau tweeted after the talks. "Thank you for your friendship over the years, and for all that you've done to help strengthen the ties between our two countries."

Abe last week announced he is resigning after a record tenure of nearly eight years to receive treatment for a chronic intestinal illness.

During a separate phone call, Johnson expressed respect for Abe's work on the international stage and the two agreed that Japan and the U.K. would work toward signing a bilateral trade agreement "as soon as possible," the ministry said.

The two countries have been in talks on a trade deal to replace the existing Japan-EU free trade agreement, to which the United Kingdom will no longer be a party when the transition period following its exit from the European Union ends in December. Both sides are seeking to implement a new deal next January.