The presence of five imprisoned Catalan politicians dominated the opening of the new legislature in Spain yesterday amid tense scenes in parliament.

Four of the Catalan nationalists who won congressional seats in last month’s general election – Oriol Junqueras, Josep Rull, Jordi Turull and Jordi Sànchez – have been in preventive custody while on trial in the supreme court along with Raül Romeva, who was elected to the Senate.

All five received permission from the court to attend the inaugural parliamentary session and take their oath of office.

The four jailed congressmen received applause from their own ranks as they entered the debating chamber, while some unionist politicians shouted “Fuera!” (“Get out!”), setting the tone for a lively and at times raucous morning.

Socialist prime minister Pedro Sánchez greeted Mr Junqueras, the former Catalan vice-president, with a handshake.

He and the other four prisoners face charges of violent rebellion and sedition along with four others for their alleged roles in Catalonia’s failed bid for independence in 2017, and could face lengthy jail sentences if found guilty.

The first action of the new Congress was to choose a new speaker, with the Socialist candidate Meritxell Batet narrowly gaining enough votes to be invested with the support of the leftist Unidas Podemos, Basque nationalists and smaller regional groups – but not Catalan nationalists.

Reputation

Ms Batet is seen as a potentially significant choice for the post, which wields substantial influence over parliamentary affairs.

A Catalan who was previously minister of territorial affairs, she has a reputation as a moderate unionist whose profile could help the government as it aims to calm tensions between Madrid and her native region.

In her first speech to the chamber in her new role, Ms Batet appealed for Spain’s fragmented Congress to seek consensus. “None of our parties represents Spain exclusively,” she said. “Each one of us is of the people, but we are not the people.”

However, as the members of parliament took their oaths of office, deep divisions were apparent.

In Congress, members of the far-right Vox party stamped on the floor and banged their desks when Catalan and Basque nationalist politicians took their oaths.

Catalan separatist members of parliament used variations of the oath of office to qualify the fact that they were swearing to uphold the Spanish constitution.

In the case of Mr Junqueras, he said he did so “with a republican commitment and due to legal imperative”. In his oath he also referred to himself as a “political prisoner”, drawing protests from the right-wing opposition.

The congressional presiding council is expected to suspend Mr Junqueras and his jailed colleagues in the coming days, meaning they would be stripped of the duties and privileges conferred on them in yesterday’s opening session.