US President Donald Trump has praised outgoing Prime Minister Shinzo Abe as Japan’s best head of government ever.

In a late night tweet, Trump said he had just spoken with Abe, who is resigning for health reasons.

“Shinzo will soon be recognized as the greatest Prime Minister in the history of Japan, whose relationship with the USA is the best it has ever been. Special man,” Trump tweeted.

“The two leaders remarked that their relationship is extraordinary; the President called Prime Minister Abe the greatest prime minister in Japan’s history,” the White House said in a readout of the call.

“The President said that Prime Minister Abe has done a fantastic job and that the relationship between the United States and Japan is better today than it has ever been,” the White House said.

Abe announced last week he was ending his record-breaking tenure, kicking off a leadership race in the world’s third-largest economy.

He said he was suffering a recurrence of the ulcerative colitis that forced him to cut short a first term in office, and that he no longer felt able to continue as prime minister.

He and Trump have met several times during the US president’s term, and staffers have hailed the “unprecedented” relationship between Trump and his “golf buddy.”

Trump announced in September last year that the two allies had taken a major step towards sealing a new trade deal, after a year of negotiations between the global economic powers.