Spain's Supreme Court on Friday turned down a request from Catalan separatist leader Jordi Sanchez to be released from jail so he could be sworn in as the region's new president next week.
Sanchez was remanded in custody in October pending charges of sedition over last year's Catalan independence bid.
The court's decision means it is unlikely that the Catalan parliament will convene on Monday as planned to appoint a new regional president since Sanchez was the only candidate.
The president of the Catalan parliament, Roger Torrent, has not yet reacted to the move.
In a written ruling Supreme Court judge Pablo Llarena said there was a risk that Sanchez -- the former head of the Catalan National Assembly, a powerful pro-independence civil group -- would again commit an offence if he were released.
Sanchez's name was put forward after former Catalan president Carles Puigdemont dropped his candidacy last week.
Puigdemont, living in self-exile in Belgium and wanted in Spain, announced on March 1 that he was abandoning his bid to return as regional president in an attempt to unblock Catalonia's political crisis.
Puigdemont faces arrest if he returns to Spain on charges of sedition, rebellion and misuse of public funds over his role in Catalonia's separatist push.
Sanchez's lawyers on Tuesday had asked the Supreme Court, which is overseeing his case, to let him out of prison to go to parliament next week to be voted in as president.
Prime Minister Mariano Rajoy's conservative government has vowed to resist any bid to break the region away from Spain and called on Catalan separatist parties to appoint a candidate for president who does not face prosecution.
"A person who is remanded in custody is not in a situation to exercise the duties required of the president of Catalonia," government spokesman Inigo Mendez de Vigo told a news conference on Friday when asked about the court's ruling.
Catalonia's separatist push triggered Spain's worst crisis in decades.
Rajoy dissolved Catalonia's parliament, called the early election and imposed direct rule over the region after Catalonia's assembly on October 27 unilaterally declared independence.
But in a blow to the central government Catalan separatist parties once again won an absolute majority of seats in the 135-seat Catalan parliament.