MADRID (Reuters) - Spain’s center-right Ciudadanos party said on Saturday it would be willing to back an unspecified neutral candidate to oust Prime Minister Mariano Rajoy over a far-reaching graft case engulfing members of his People’s Party (PP).

Spain's Prime Minister Mariano Rajoy gestures during a news conference at the Moncloa Palace in Madrid, Spain, May 25, 2018. REUTERS/Stringer.

Jose Manuel Villegas, secretary-general of Ciudadanos, told a news conference his party could work with the opposition Socialists to support an alternative candidate in a no-confidence vote to unseat its former ally Rajoy, who leads a minority government beset by numerous corruption scandals.

Rajoy said on Friday he would fight the no-confidence vote and finish his four-year term, ruling out early elections.

Pro-business Ciudadanos (meaning Citizens in English) declined to support the no-confidence motion put forward by Socialist leader Pedro Sanchez earlier that day.

But Villegas said on Saturday his party could back a “practical candidate” who was neither Sanchez nor Ciudadanos leader Albert Rivera. To succeed, the two parties would need to agree a joint candidate to replace Rajoy and on other questions such as calling a snap election. They would also need the backing of leftist party Podemos.

A no-confidence vote requires the candidate to gather 176 or more votes in Spain’s lower house, a difficult task in the fragmented parliament where nationalists, among them two Catalan separatist parties, could be decisive if the larger parties cannot reach an agreement.

Speaking to Cope radio on Saturday, Socialist Secretary General Jose Luis Abalos said the party would not work with Catalan separatist parties and called on Ciudadanos to support Sanchez’s bid to replace Rajoy as PM in exchange for a promise to call snap elections soon after taking office.

Defence Minister Maria Dolores de Cospedal criticized the Socialists’ plan, claiming it would be reliant on support from Catalan secessionists who last year led a failed attempt to break away from Spain.

“If the Socialist party wants to obtain power at the cost of allying with those who seek to destroy our country, it is its responsibly [but] the resulting government would be completely inviable,” Cospedal told public television.

Borrowing costs in southern Europe shot up on Friday and stock markets in Milan and Madrid fell as the threatened no-confidence motions against Rajoy exacerbated a sell-off provoked by growing political risk in Italy.

The graft case, which relates to the use of a slush fund by the PP in the 1990s and early 2000s to illegally finance campaigns, has plagued Rajoy since he took office in 2011. He has always denied wrongdoing.

Twenty-nine people related to the PP, including a former treasurer and other senior members, were convicted on Thursday of offences including falsifying accounts, influence-peddling and tax crimes. They were sentenced to a combined 351 years behind bars.

Rajoy had already been under fire for his handling of the secession crisis in Catalonia, with many voters turning away from his People’s Party (PP) to Ciudadanos.

Although Ciudadanos is currently only the fourth-largest party in parliament, polls predict it would be the most-voted group in new elections.