US consular officials have been given access to an American ex-Marine arrested in Moscow accused of espionage, the Russian foreign ministry said on Wednesday.

The consular visit took place five days after 48-year-old Paul Whelan was detained in the Russian capital last Friday.

“Russia has given America consular access to US citizen Paul Whelan,” the foreign ministry said, according to news agency RIA Novosti.

Mr Whelan faces up to 20 years in prison if found guilty, according to the ministry.

He was arrested “while carrying out an act of espionage”, Russia’s FSB domestic security service said.

His family has denied he is a spy, saying he was visiting Moscow to attend a wedding.

Born in Canada, Mr Whelan is director of international security for BorgWarner, a car parts manufacturer headquartered near Detroit, his brother David Whelan has told several US media outlets.

His arrest came after President Vladimir Putin accused Western nations of using espionage cases to try to undermine an increasingly powerful Russia.

US intelligence services have accused Moscow of interfering in the 2016 presidential election.

US Special Counsel Robert Mueller has charged 25 Russians — including members of the GRU military intelligence — and three Russian companies for that alleged interference, but they have not been arrested.

In December, Russian national Maria Butina pleaded guilty in a federal court in Washington to acting as an illegal foreign agent.

Butina faces up to six months in prison, followed by likely deportation.