MADRID — Spain's ruling party is battling another corruption scandal — one that could end the career of a potential successor to Mariano Rajoy.

The conservative president of the Madrid region, Cristina Cifuentes, is accused of fraudulently obtaining her master's degree but is refusing to step down, leaving the Spanish prime minister with the choice of forcing her out or risking losing control of the region.

The timing is particularly bad for Rajoy's Popular Party. It's already fragile and relies on the opposition to pass legislation, and has of late been overtaken in the polls by its liberal rival Ciudadanos.

It also affects one of the rising stars of the ruling party. The 53-year-old Cifuentes was among a handful of potential candidates touted by the press as a successor to Rajoy — and she had tried to cultivate a reputation for being clean in a party tainted by corruption scandals.

Many now see her as a dead woman walking.

The case allegedly involves a corrupt structure within a public university providing degrees to friendly politicians.

The scandal broke last month when online newspaper El Diario reported that Cifuentes had been given a master's degree in law by Madrid’s King Juan Carlos University thanks to a faculty official who went into the computer system and altered two of her marks — including her dissertation — from “not filed” to a grade of “7.5” out of 10.

Qualifications scandals have led to the resignations of politicians across Europe in recent years — particularly in Germany, where two ministers in Chancellor Angela Merkel’s Cabinet resigned in 2011 and 2013 over allegations of plagiarism.

Yet Cifuentes’ case goes beyond plagiarism. It allegedly involves a corrupt structure within a public university fraudulently providing degrees to friendly politicians.

On top of that, the way the scandal has been handled has sparked a nationwide controversy that threatens to further undermine Rajoy’s already-damaged credibility.

https://twitter.com/ccifuentes/status/976603946298101760

After the press reports came out, Cifuentes started playing hardball. She provided a document signed by three professors that she said was proof her dissertation was obtained in the correct manner, and showed her qualifications for every course she had taken.

“To those who want me to leave: I’m not going anywhere. I’m staying,” Cifuentes said in a statement on social media in which she portrayed herself as the victim of an “absolutely unfair” attack.

Before that, the dean of the university and the director of the degree program appeared before the press, saying she had passed the course, and it was all a bureaucratic mistake.

But cracks in that version of events soon began to appear.

U-turn after U-turn

Students and professors came forward to say they couldn’t remember her ever attending classes or taking exams. The newspaper El Confidencial reported that some of the signatures on the document she provided about her dissertation were fake.

That proved a tipping point. Professors who had backed Cifuentes suddenly denied having examined her thesis and the director of the master's program admitted fabricating the document she presented.

An internal investigation by the university concluded there was no evidence of her defending her thesis. Finally, the public prosecutor’s office stepped in — its investigation is ongoing.

Cifuentes kept silent while the evidence mounted against her but then doubled down: She filed a criminal complaint against the journalists from El Diario who broke the story; she tried to blame the university; her party asked people to come forward anonymously to say who was behind what it described as the “setup against Cifuentes.”

Then on Tuesday she announced via Twitter that she was renouncing her master's degree and again blamed any irregularity on the university.

Verónica Fumanal, a political consultant who’s worked for the Socialists and Ciudadanos, said Cifuentes committed many mistakes in her handling of the case. The PP's Madrid chief pushed an incoherent narrative which was immediately disproved, she didn’t ask for forgiveness, didn’t show humility and appeared defiant, and she attacked the media.

Cifuentes isn't the only PP official to be caught up in the university scandal.

El País reported that Pablo Casado, vice secretary of communications for the PP, obtained the same master's degree as Cifuentes, also in disputed circumstances. However, he immediately admitted passing courses despite not having gone to class, and showed some of the essays he'd written.

The situation in Madrid presents both the PP and Ciudadanos with complicated political incentives and risks.

MPs and officials from most political parties have since been caught changing their qualifications online. There have been cases of lawmakers saying they have a degree when they didn't complete the course. Others spiced up their qualifications by making days-long courses appear as post-graduate degrees.

But it's the Cifuentes case that's the highest profile and potentially the most damaging.

Opposition smell blood

The Socialists have said they will present a motion of no-confidence in the Madrid regional chamber and take the minority government down.

The Socialists will need the backing of the far-left Podemos — who’ve said they'll cooperate — and Ciudadanos — who’ve been hesitant. The liberals say they will back the no-confidence motion if Cifuentes doesn't resign — or get sacked.

“It’s in the hands of Rajoy to either keep endorsing the corruption of his party or to maintain the government of Madrid with a clean candidate,” Ciudadanos' Inés Arrimadas told reporters Monday.

Cifuentes says she's going nowhere, pointing out that she hasn’t been indicted or put under investigation, while her team has made clear that she doesn’t intend to resign unless ordered to do so by Rajoy.

The Spanish leader is keeping his options open. On Friday, he downplayed the case, telling reporters that Cifuentes had provided an explanation and there was “no reason to break the agreement” between the PP and Ciudadanos, in which the latter props up the former, just like at national level.

Asked if Cifuentes should resign, Justice Minister Rafael Catalá said Monday it was “reasonable” to wait until all investigations are concluded.

Staring contest

The situation presents both the PP and Ciudadanos with political incentives and risks.

The liberals, who’ve relentlessly hammered the conservatives over corruption cases in recent years, need to be tough to prove that they mean what they say. At the same time, Ciudadanos risks infuriating its more conservative supporters if it backs a no-confidence motion that results in a Socialist taking control of Madrid.

The PP, meanwhile, can ensure it keeps control of Madrid by cutting Cifuentes loose — and replacing her with another party official. But some supporters are tempted to support her in order to force Ciudadanos to either back down or support a Socialist leader in Madrid. There are those within the PP that believe such a tough choice will damage Ciudadanos at the national level.

“I’m looking forward to seeing [Ciudadanos’ leader Albert] Rivera sitting together with [Podemos’ leader] Pablo Iglesias to negotiate the motion of no confidence,” said Fernando Martínez Maíllo, the general coordinator of the PP (and the party’s No. 3), in a radio interview last week.

“I believe it’s very difficult that Ciudadanos reaches an agreement with the Socialists and Podemos,” said José Fernández Albertos, a political scientist at the Spanish National Research Council.

“The PP would have their electoral campaign already made,” said Fumanal, the political consultant. “These people [Ciudadanos] said they were liberals and then they supported a government with the radicals [Podemos].”

“Cifuentes is going to dig in the trenches and will stand as long as she can,” said Nacho Escolar, the director of El Diario, the outlet which broke the scandal, adding that “she has ethical reasons to do so because her party is led by a person [Rajoy] who was caught up being paid under the counter.” Rajoy hasn't been accused of any wrongdoing in the courts.

However, Escolar reckons Cifuentes' time is running out because the PP government needs the support of the opposition.

“She will fall sooner or later,” he said.

This article was updated after Cifuentes renounced her master's degree.