Yolanda Fuentes resigned as Madrid's head of public health as the local authorities asked the central government to relax measures from Monday, a regional spokesman said.
Local authorities gave no reason for Fuentes stepping down during the coronavirus pandemic that has killed more than 26,000 people in Spain.
But Spanish media reported she had disagreed with moves to ease restrictions in Madrid, the region hardest hit by the coronavirus in Spain, with a third of the country's fatalities.
Without mentioning Fuentes, Madrid's local government said it had named Antonio Zapatero, who directed a field hospital in the capital at height of the outbreak, to manage lifting the region's lockdown.
The Spanish government is gradually dismantling one of the most severe lockdowns in Europe, in force since March 14. It will ease restrictions into June in stages.
Local regions can request to progress to more open stages if they meet certain criteria, such as having enough hospital beds or the capacity to isolate sources of contagion.
Madrid regional leader Isabel Diaz Ayuso, from the rightwing opposition Popular Party (PP) and a critic of Socialist Prime Minister Pedro Sanchez, had asked the health ministry for permission to move to another stage and reopen hotels and restaurant terraces and gatherings for up to 10 people.
The move came after fierce debate between the PP and their partners in the regional government, the centre-right Ciudadanos party, about whether it was advisable to further lift measures.
Spain has only recently started lifting some restrictions, allowing children outdoors and adults to leave the house to exercise.
Some small businesses have also been permitted to receive customers.
Sanchez has warned that suddenly ending the strict lockdown would be “unforgivable”, but he has faced resistence from right-wing opponents.
Spain's parliament on Wednesday voted to extend the country's state of emergency, allowing stringent coronavirus lockdown measures to remain in place for at least two more weeks.
- Madrid to reopen some (but not all) city parks and pedestrianize streets to alleviate crowds
- A guide to Spain's lockdown rules during Phase Zero
- Q&A: When will my province in Spain move to Phase 1?