"All of my actions, my whole life has been called into question," 53-year-old Cifuentes told reporters, claiming she was the victim of a lynch mob.

Her resignation marks the fall of a politician who had been supposed to spearhead a campaign to restore the ruling conservative Popular Party's image that has been tainted by a series of corruption scandals.

For over a month, Cifuentes has been caught in a media storm over accusations she obtained a 2011-2012 law diploma from Madrid's King Juan Carlos University (URJC) without taking all the required exams and rarely attending lectures.

Prosecutors are investigating after the university rector himself admitted a document attesting she had passed was a "reconstruction" of the original, with two professors' signatures faked.

But she refused to resign, insisting she had not done anything illegal, although she said she had given up "using the degree".

But on Wednesday, a video emerged in Spanish media dating back to 2011 that purportedly showed a security guard asking her to open her bag after allegedly shoplifting in a supermarket.

Cifuentes confirmed the authenticity of the video, but insisted that she had "involuntarily" taken around 40 euros ($49) worth of unspecified cosmetics.

Announcing her resignation, Cifuentes, who has been president of the Madrid region for three years, said she had taken the decision "to take a step back a few days ago" in order to stop the left from wresting power in the region.

The left had indeed filed a motion for a vote of no confidence against her in the regional parliament -- a move that was likely to succeed after the centre-right Ciudadanos party withdrew its support for her.

She has not put forward a potential successor, with a year to go before regional elections in Madrid, which accounts for around 20 percent of the country's entire economy.

Her resignation came "after a shameful month", said Inigo Errejon of the far-left Podemos party.

"We are satisfied. Madrid deserves a change," said Ciudadanos president Albert Rivera.