Donald Trump’s attorney Rudolph Giuliani caused a diplomatic stir on Tuesday by complaining to the president of Romania about the country’s efforts to tackle corruption and calling for an amnesty for some convicted criminals.

In a letter to Romanian president Klaus Iohannis, which was published by Mediafax, Giuliani sharply criticised what he called “excesses made in the name of ‘law enforcement’” by Romania’s national anti-corruption directorate. The agency, he said, had used unfair tactics against suspects and intimidated judges and lawyers.

“An amnesty should be given to those who have been prosecuted and convicted through the excesses,” Giuliani said, claiming “many innocent people” had been jailed.

Giuliani’s remarks aligned him with political forces in Romania who last month succeeded in ousting the country’s top corruption prosecutor, who had pursued senior politicians, prompting tumultuous public protests.

His letter was written under the letterhead of Giuliani Partners, his private consultancy firm, and did not mention his role as personal lawyer to the US president. Giuliani said in a text message he was acting as a contractor for the Freeh Group, a consultancy run by his friend Louis Freeh, the former FBI director. Freeh is currently “advising a Romanian defendant contesting his conviction” by the anticorruption agency, according to an interview he gave Forbes last week.

The state department moved to distance itself from Giuliani’s intervention. Asked if the US agreed with his remarks, a spokesman said: “Romania until recently has shown considerable progress in combating corruption and building effective rule of law. We encourage Romanians to continue on this path.” The White House did not respond to a request for comment.

The Romanian president Klaus Iohannis. Photograph: Robert Ghement/EPA

By then the former New York City mayor’s letter had been criticised by Romania’s ambassador to the US, George Maior, who said Giuliani appeared to be speaking on behalf of Romanians “who have problems with the justice system”. Asked if he knew the identity of Freeh’s Romanian client, Giuliani said he would defer to Freeh, who did not respond to an email.

The ambassador’s response in turn angered the Romanian foreign ministry, which said in a statement his words “does not represent the position” of the government. It said Maior was being recalled to Bucharest to discuss his remarks.

The ministry also noted that the country’s ambassadors should “refrain from public statements that could negatively affect bilateral relations with other states”.

Giuliani, a former federal prosecutor, said in his letter he supported legitimate efforts to curb corruption. But he protested repeatedly about what he claimed were recent excesses in Romania.

Last month, Iohannis fired the head of the country’s anti-corruption directorate, Laura Codruta Kovesi, who had led an aggressive push to prosecute corruption among the Romanian elite. Earlier moves by the government to rein in Kovesi prompted waves of street demonstrations.

Romania scores 48 out of 100 on a perceived government corruption scale measured by Transparency International, where 0 is the most corrupt and 100 least. Romania ranks joint 59th out of 180 countries, alongside Greece and Jordan.