President Recep Tayyip Erdogan on Saturday told Donald Trump that the court's decision to free an American pastor was taken "independently", after the US president thanked the Turkish strongman for his efforts in securing the release.

"Mr President @realDonaldTrump, in line with what I have always said, the Turkish judicial decision was taken independently," Erdogan wrote on his official Twitter account.

Trump had earlier tweeted "I would like to thank President @RT_Erdogan for his help!" in freeing pastor Andrew Brunson, who was held for two years by Turkey.