After weeks of haggling, Socialist leader Pedro Sánchez has clinched a vote in parliament to lead Spain for another term as prime minister.
He has secured a four-seat majority in the 350-seat chamber, after sealing an amnesty deal for Catalans involved in a failed bid to secede from Spain.
The conservative Popular Party won elections in July, but leader Alberto Núñez Feijóo failed to form a majority.
Mr Sánchez told MPs that the amnesty deal would help "heal wounds".