MADRID, Spain (AP) _ Thousands of Spaniards lined up outside Madrid's royal palace Monday to pay last respects to Maria de las Mercedes de Borbon y Orleans, the mother of Spain's King Juan Carlos.

De Borbon, who held the title of Countess of Barcelona, died Sunday in the La Mareta residence on the Canary island of Lanzarote surrounded by her family. She was 89.

The countess was widely recognized as having played a key moderating role within her family in the mid-1960s, when Juan Carlos was hand-picked as king by then Spanish dictator Gen. Francisco Franco over the rightful heir, the king's father, Juan de Borbon.

Her remains were flown to Madrid on Sunday. She was to lie in state at the Oriente Palace until Tuesday, when she is to be buried in the monastery of San Lorenzo de El Escorial on Madrid's western outskirts, the burial place for all Spanish royals, including the countess's husband.

Among the first to pay their last respects were Madrid Mayor Jose Maria Alvarez del Manzano and Madrid regional government president Alberto Ruiz Gallardon.

The countess was mother to four children, including Juan Carlos, who took the throne in 1975, the same year as Franco's death.

A known lover of bullfighting, art and music, the countess spent almost half her life, 1934-1976, in exile. She left Spain on the proclamation of the II Republic in 1934 and went to live in Paris, Rome and later Estoril, Portugal.

She met her future husband in 1935 in Rome, where three years later she gave birth to Juan Carlos.