The figure is an increase of 7.3% compared to the summer of 2023, the National Institute of Statistics said.
Spain is the second most popular tourist destination in the world. The country welcomed 10.9 million visitors in July and the same number in August.
The influx of tourists, however, does not appeal to all Spaniards. Protesters have voiced their discontent in recent months, particularly in Barcelona, Malaga in Andalusia, the Balearic Islands and the Canary Islands.
Protesters have complained about the strain on infrastructure, pollution and noise.
They were also angered by the rise in rental prices due to many properties being rented out to tourists at bargain prices on a short-term basis.
Several regions have reacted, with Barcelona announcing it will stop renting apartments to tourists by 2029.
The Socialist government of Prime Minister Pedro Sanchez is working on creating a register for tourists and seasonal accommodation.
The most common nationality of tourists in Spain during the summer was British. 4.17 million Britons visited the country.
Next in the ranking were the French (3.75 million), Germans (2.49 million) and Italians (1.35 million).
There was also a 13% increase in the number of American tourists - 850,000.
In the first eight months of the year, Spain welcomed a total of 64.8 million tourists. According to the National Statistics Institute, this is another record.
The most popular tourist destinations are Catalonia, the region that includes Barcelona, the Balearic Islands and the Canary Islands.
With more visitors comes more money and tourism revenues rose by 17.6% over the period to 86.7 billion euros.
This amounts to 187 euros per day per tourist.
According to Exceltur, an organisation set up by the heads of Spain's biggest tourist groups, 90 million tourists are expected in 2024.
This will easily surpass the previous record of 85.1 million last year.
Tourism revenues are expected to exceed 200 billion euros, which will increase the sector's contribution to the Spanish economy to 13.2%, according to Exceltur. | BGNES