The official tally of cases rose to 177,633 on Wednesday from 172,541 the day before, the ministry said
The daily number of deaths from the coronavirus in Spain fell slightly on Wednesday to 523 from 567 the previous day, the health ministry said, as the country was ramping up testing that could allow it to further ease tough restrictions.
With the total number of fatalities at 18,579, Spain remains one of the world's worst-affected countries, with only the United States and Italy recording higher death tolls. But there is growing evidence the government is managing to flatten the curve on deaths and infections.
The official tally of cases rose to 177,633 on Wednesday from 172,541 the day before, the ministry said.
Prime Minister Pedro Sanchez said efforts were under way to ramp up testing, to get a tighter grip on the spread of the disease and build a strategy for emerging from a lockdown that has kept most Spaniards confined to their homes since mid-March.
The loosening of restrictions began this week as some non-essential businesses were allowed to resume work.
"A group of institutions is making efforts to increase the number of tests. The number of tests made in Spain is rising," Sanchez told a near-empty parliament.
"Spain is already one of the countries making the most daily tests. More than 20,000, and we are increasing the number."
For lockdown restrictions to be lifted, officials say testing has to be widened to find carriers who may have mild or no symptoms.
The government said last week it would carry out mass rapid antibody tests, with 60,000 randomly chosen people to be tested over three weeks to gauge the spread of the virus. Governments have touted such tests as a way to determine if people have developed immunity through exposure to the coronavirus.