Read in Catalan

His PSOE party knew the numbers were tight: they'd asked all their deputies to spend last night in Madrid, despite it being a public holiday, to try and make sure no one was missing for the vote. In the end they made it and Pedro Sánchez has been reelected prime minister of Spain. He only got, however, a simple majority of two, based on alliances which will see him in constant negotiations throughout the legislature.

Without the help of the Catalan and Basque independence movements, the first coalition government since the Second Spanish Republic (1931-39), could prove very short in duration. ERC's Gabriel Rufián has already warned: "If there's no dialogue table, there's no legislature." Catalonia is the elephant in the room whilst the far right continues to stir up tension.

Despite great speculation, in the end no further delegates changed their announced votes and the result was as expected: 167-165 in favour of Sánchez. In the 'yes' camp, his own PSOE, new coalition partners Unidas Podemos, and PNV, Más País, Compromís, BNG, Teruel Existe and Nueva Canarias. The 'no' side was a mixed bag including PP, Ciudadanos and Vox as well as JxCat, CUP, Navarra Suma, PRC and the deputy from Coalición Canaria who had announced she would vote against her party's line. The Teruel Existe delegate, Tomás Guitarte, spent the night in an undisclosed location, under intense pressure to change his vote. Then there were the 18 abstentions of ERC and EH Bildu. Although not the first minority government, it's the joint fewest votes for a successful candidate since the restoration of democracy and the narrowest successful margin.

The vote was so close that, once again, PSOE's spokesperson Adriana Lastra and leader in the Congress Rafael Simancas checked off each of the 350 delegates on a list. When the result was announced, loud applause broke out in the chamber. There was a heartfelt embrace between Sánchez and Podemos leader Pablo Iglesias, as well as between some of their fellow future cabinet colleagues. Iglesias, Pablo Echenique and other Podemos leaders were visibly moved, with tears in their eyes.

The most hard-won votes for Sánchez were the 18 abstentions of Catalan pro-independence party ERC. If they had voted 'no', today's investiture would have been impossible. Going back on some of his previous comments, Sánchez decided to commit to a dialogue table involving the Spanish and Catalan governments, to be formed within the next two weeks. Whatever conclusions the talks reach will be put to the Catalan people in a referendum. ERC warned earlier this week that they won't accept a "scam". If he loses their support, or rather their abstention, Sánchez could find his government falling.

Sánchez: "Dialogue within the Constitution"

Of his ten-minute speech in the Congress today, barely 30 seconds were dedicated to the question of Catalonia, one of the main causes of the political turmoil seen in Spain over the last year. He said that the proposed dialogue is "necessary" to solve the conflict, but that it must take place "within the Constitution". "We'll live through a time of dialogue, a dialogue necessary to overcome the territorial disputes," he said. "We'll do it always within the Constitution, looking out for integrity, differences, on the basis of respect, working for the common good."

ERC: "Dialogue requires empathy”

It wasn't Rufián speaking for ERC today, but Montse Bassa, sister of imprisoned former Catalan minister Dolors Bassa. She admitted that "personally", in a climate of repression, she "didn't care at all" about the governability of Spain. She even called PSOE's delegates "executioners" because it's "in their hands to change the laws".

"When I visit at the damn glass window Dolors, Carme [Forcadell], Oriol [Junqueras] or Raül [Romeva], they always smile at my anger and remind me that we believe in dialogue," said Bassa. She warned that the dialogue to come will require "empathy" and said that they were abstaining "in great skepticism", but that it was necessary to "give an opportunity for dialogue". During her speech, shouts of "coup plotter" and "long live the police" could be heard.

With perhaps even greater skepticism, Laura Borràs (JxCat) said her party "couldn't vote against Catalonia and in favour of the repression". Existing tensions between the two largest pro-independence parties have grown in recent days over ERC's decision to talk with PSOE and now abstain. At the end of her speech, she went up to Pedro Sánchez to hand him a copy of the European Parliament's statement announcing it will "take note" of the election of Carles Puigdemont, Oriol Junqueras and Toni Comín as MEPs.

Coalition cabinet ready

The structure of Sánchez's coalition government is already in place, but it's not yet all known publicly. He will have three deputy prime ministers: Carmen Calvo (PSOE) will retain the first one, Pablo Iglesias will get the second with responsibilities for Social Affairs, and the third will be Nadia Calviño (PSOE) with the economic portfolio. The other Podemos ministries have also emerged: Equality for Irene Montero, Consumer Affairs for Alberto Garzón, Work for Yolanda Díaz and Universities for Manuel Castells.

At least one change is expected among the remaining PSOE members, with Education minister Isabel Celaá out as spokesperson. The favourite to take over the responsibility is Finance minister María Jesús Montero, once of PSOE's rising stars. Other names being suggested are Fernando Grande-Marlaska (Interior), José Luis Ábalos (Public Works), Teresa Ribera (Environment), Magdalena Valerio (Social Security) and Margarita Robles (Defence).

Sánchez's intention seems to be to get to work as soon as possible, as suggested by starting the investiture debate over a holiday weekend. Tomorrow, Wednesday, he'll take the oath of office before the king at 11am. That said, it seems he's in less of a rush over his ministers. They'll be announced next week before they themselves take their oaths before the monarch. That would suggest that this Friday's weekly cabinet meeting will still involve the acting government.

Ovation for Aina Vidal

One of the other moments today was the return of Podemos delegate Aina Vidal. She'd missed the first vote at the weekend, when Sánchez needed an absolute majority, for health reasons, announcing afterwards she's been diagnosed with cancer. She was received with a standing ovation from a large majority of the chamber. At the end of the session, Pablo Iglesias went up to present her with a large bunch of flowers.