Madrid regional president Esperanza Aguirre, an influential Spanish politician and a leader of the conservative wing of the ruling centre-right People's Party (PP), resigned on Monday in a surprise announcement.
Aguirre has been a huge vote-getter for the PP in populous Madrid, and was the first woman politician in Spain to be seen as a possible future president.
She has also clashed publicly with Prime Minister Mariano Rajoy, who has moved the party in a more moderate direction.
Aguirre announced in 2011 that she had breast cancer but on Monday said her health was only part of a decision to end her three-decade political career.
"I want to spend more time with my grandchildren," said Aguirre, who has been president of the Community of Madrid, the region that includes the country's capital, since 2003.
She was Spain's first female head of the Senate, its first female regional president and also served as education minister.
She brought bilingual English-Spanish teaching to Madrid schools and opened many hospitals in the region.
Aguirre denied her resignation was linked to her recent public disagreement with Rajoy over the early release of terminal cancer patient Jesus Maria Uribetxeberria Bolinaga, a convicted kidnapper from violent Basque separatist group ETA.
Rajoy had said he had to follow the law on the release, but Aguirre and other hardliners had said a way should have been found to keep him in prison.
In recent months Aguirre has championed Madrid as the site for a Las Vegas Sands casino.
The capital beat rival Barcelona in a charm offensive, which saw the project, expected to be worth up to 17 billion euros (13.5 billion pounds) in investment, awarded to Madrid earlier this month.
(Reporting by Clare Kane; editing by Fiona Ortiz and Jason Neely)