MADRID — Catalonia's parliament has voted to change regional laws so that it can elect fugitive former leader Carles Puigdemont as president, even though the move is almost certain to be blocked in court.

The slim majority of separatist lawmakers in the parliament voted in favor of allowing Catalonia's president to be sworn in without being present and to govern from abroad.

Puigdemont is currently on bail in Germany awaiting extradition to Spain, where he is accused of rebellion and misuse of public funds in organizing an unauthorized referendum last year on Catalonia's independence.

Catalan separatist parties have defied the Spanish government for the past six months by continuing with efforts to secede from Spain. Court rulings have repeatedly thwarted their ambitions, because the constitution says Spain is "indivisible."