Spain, one of the world's leading tourist destinations, will next Sunday re-establish free travel with fellow EU countries, Prime Minister Pedro Sanchez announced.
The land border with Portugal will however remain closed until July 1. Portugal has suffered a much lower death rate than Spain from the coronavirus epidemic.
Madrid had previously planned to restart full EU travel on July 1 but decided to lift "border checks with all member countries on June 21," Sanchez said in a televised speech on Sunday.
The new date coincides with the lifting of the emergency Spain clamped on the country from mid-March to fight COVID-19 as fatalities soared.
Spain has recorded more than 27,00 deaths in the pandemic, one of the highest tolls around the world.
But by Monday, more than 70 percent of Spain's 47 million population will be in the final stage of a phased rollback of the lockdown that should finish by June 21.
The European Commission has recommended that the 27 EU members fully reopen their frontiers with each other on June 15 and many countries are planning to do so.
Italy reopened its borders on June 3, lifting all restrictions for travellers from within Europe.
Madrid has declared the virus under control but Sanchez alluded to fears that opening the borders could provoke a new surge, saying, "It's a critical moment but we are prepared".
Travellers who arrived in Spain after May 15 and had to go into quarantine will see the end of their period in isolation on June 21, Sanchez added.