MADRID — Spain on Thursday began exhuming the remains of Spanish dictator Gen. Francisco Franco from his grandiose mausoleum outside Madrid so he can be reburied in a small family crypt elsewhere.

The government-ordered, closed-door operation Thursday satisfies a decades-old desire of many in Spain who considered the vainglorious mausoleum that Franco built an affront to the tens of thousands who died in Spain's Civil War and his subsequent regime and to Spain's standing as a modern democratic state.

The operation, which has been criticized by some conservatives, was broadcast live by Spain's main TV channels and media websites.

Franco's coffin was being extracted from under marble slabs and two tons of granite at the Valley of the Fallen mausoleum. Depending on the weather, it was being taken by helicopter or hearse to Mingorrubio cemetery where his wife is buried, a 35-mile drive away.

Spanish Generalissimo Francisco Franco in 1936. AFP - Getty Images

The exhumation and reburial will not put an end to Franco's legacy on Spain's political scene, since it comes just weeks ahead of the country's Nov. 10 general election where Spain's main left- and right-wing parties are battling for power once again.

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.

A staunch Catholic, he viewed the war and ensuing dictatorship as something of a religious crusade against anarchist, leftist and secular tendencies in Spain. His authoritarian rule, along with a profoundly conservative Catholic Church, ensured that Spain remained virtually isolated from political, industrial and cultural developments in Europe for nearly four decades.

The country returned to democracy three years after his death but his legacy and his place in Spanish political history still sparks rancor and passion.

For many years, thousands of people commemorated the anniversary of his Nov. 20, 1975, death in Madrid's central Plaza de Oriente esplanade and at the Valley of the Fallen mausoleum outside of the capital. And although the dictator's popularity has waned immensely, the exhumation has been criticized by Franco's relatives, Spain's three main right-wing parties and some members of the Catholic Church for opening old political wounds.

The exhumation was finally authorized by the Supreme Court in September when it dismissed a months-long legal bid by Franco's family to stop it.

The exhumation stemmed from amendments of a 2007 Historical Memory Law that aimed to seek redress for the estimated 100,000 victims of the civil war and the Franco era who are buried in unmarked graves, including thousands at the Valley of the Fallen. The legislation prohibited having Franco's remains in a public place that exalted him as a political figure.

Having been unable to press ahead with the exhumation last year, Spain's interim Socialist Prime Minister Pedro Sánchez wanted the exhumation and the reburial completed by the Nov. 10 election, a move that opposition parties say smacks of electioneering.