The leader of the Spanish Workers’ Socialist Party took over as Spain’s prime minister on Friday, after a no-confidence vote spurred by a corruption scandal ousted conservative leader Mariano Rajoy.

Pedro Sanchez won the no-confidence motion with 180 votes in favor, 169 against and one abstention, according to the Associated Press. He could be sworn into office as soon as Saturday. The report notes that Rajoy’s ouster by parliament is a first for a serving leader in four decades of Spanish democracy.

Rajoy’s no-confidence vote in parliament was prompted by a corruption trial that has involved multiple members of his center-right party, and his departure puts Spain into a precarious political landscape, according to NBC News.

“Mr. Sanchez will be the head of the government and let me be the first to congratulate him,” Rajoy reportedly told deputies before the no-confidence vote was cast.

Read more