MADRID — Spain’s armed forces have fired an army captain after a video showed some 30 soldiers of the officer’s unit kneeling in front of the Valley of the Fallen mausoleum, the most potent existing symbol of the dictatorship of the late Gen. Francisco Franco.

The Defense Ministry said Thursday that the captain was dismissed within hours of the video being posted on social media and that an investigation into the incident would be completed within 48 hours.

The video posted by a pro-democracy army group showed the soldiers kneeling with rifles in their hands on the steps at the mausoleum’s esplanade as a priest blessed them.

Many people viewed the video as tarnishing Spain’s claim to be a secular state, and several political parties have demanded an explanation from Defense Minister Margarita Robles.

The grandiose mausoleum — with a towering cross that is visible from miles away — was Franco’s burial place and has always been a revered shrine for his extreme right-wing followers. In 2019, the Socialist government ordered the removal of Franco’s remains under a law that banned exaltation of the dictator at the site.

That decision fulfilled a decades-old desire of many in Spain who considered Franco’s mausoleum an affront to his victims and to Spain’s standing as a modern democratic state. Thousands of political prisoners who worked on the construction of the mausoleum near Madrid are buried there without identification.

Franco ruled Spain between 1939 and 1975, after he and other officers led a military insurrection against the Spanish democratic government in 1936, a move that started a three-year civil war. The military and the Catholic church formed the backbone of Franco’s regime until the dictator died in 1975.

In recent years there have been isolated incidents involving retired army officers criticizing the government and expressing nostalgia for the Franco regime.