Russia has banned Michael McFaul, a former US ambassador to Moscow under Barack Obama, from entering the country, McFaul and Russian foreign ministry sources said.

Russia has a travel ban in place on some US officials in retaliation for a US ban on Russian officials entering the United States.

McFaul, ambassador in Moscow from 2012 to 2014, said he had learned of the ban when applying for a visa to Russia to help defeated presidential candidate Hillary Clinton prepare for what he thought would be her transition to the White House.

“I have hundreds of friends in Russia. I’m really sorry that these sanctions will make communicating with people harder,” McFaul wrote on social media on Saturday.

In a separate post, he described why he thought he had been sanctioned: “[I] was told that I am [on] the Kremlin’s sanctions list because of my close affiliation with Obama. I will take that as a compliment! The US sanctioned Russians close to [President Vladimir] Putin.“

“To the best of my knowledge, George Kennan was the last US ambassador to USSR/Russia to be banned from travelling there.”

Moscow declared Kennan persona non grata in 1952.

The Russian foreign ministry did not publicly confirm the ban, but ministry sources told Russian news agencies McFaul had been added to a sanctions list in 2014.

He was not banned because of his support for Obama, a foreign ministry source told the TASS and RIA news agencies, but because of his “active participation in the destruction of the bilateral relationship and relentless lobbying in favor of a campaign to pressure Russia”.

The Kremlin had strained relations with McFaul when he was ambassador, bridling at his contacts with the opposition. McFaul is now a professor of political science at Stanford University.