LONDON — Two-time Olympic silver medalist Louis Smith apologized Monday for a video in which he and a fellow gymnast appear to mock Islam.

Smith and Luke Carson are shown in a leaked video laughing and pretending to pray while shouting “Allahu Akbar,” or Arabic for “God is greatest.”

“I am deeply sorry for the recent video you may have seen,” the 27-year-old Smith said in a statement posted on Twitter. “I recognize the severity of my mistake and hope it can be used as an example of how important it is to respect others at all times. I have learnt a valuable life lesson and I wholeheartedly apologize.”

A British tabloid published a clip from the video that was taken at a hotel wedding reception.

Smith won silver medals in the pommel horse at the 2012 London Olympics and 2016 Rio de Janeiro Games. He also won bronze in the pommel horse at the 2008 Beijing Olympics and a team bronze in London.

Carson, who has competed for Northern Ireland at the Commonwealth Games and other international events, retired last year because of injuries. He also reportedly apologized.

Britain’s national gymnastics federation said it would investigate the incident, with Smith and Carson both facing possible sanctions.

“British Gymnastics does not condone the mocking of any faith or religion and is appalled by such behaviors,” the federation said. “Members who break our code of conduct can face suspension or expulsion from our organization.”

The Muslim Council of Britain welcomed the federation’s move.

“This behavior by leading and decorated sportspeople is sadly a confirmation of how Islamophobia has become acceptable. It is therefore heartening that British Gymnastics has resolved to take swift and decisive action,” the Muslim council’s deputy secretary general, Dr. Omer El-Hamdoon, said.

“The supposed apology that has been issued by the two men falls well short of addressing the hurt caused against Muslims,” he added. “We hope they reflect upon their actions and realize the need for people to follow their faith with dignity.”