Two suspected members of Basque separatist group Eta have been arrested as they headed to Madrid in a truck laden with explosives.
Eta recently extended its campaign against Spanish tourist targets
Spanish police said they were arrested early on Sunday about 140km outside the Spanish capital, with 500kg of explosives hidden in the vehicle.
Government officials believe the men were planning an attack in the lead-up to Spain's general election.
Eta has killed more than 800 people in its campaign since the late 1960s.
Earlier this month the group said it was extending its campaign against Spanish tourist targets from the summer season to year round attacks.
The BBC's Katya Adler, in Madrid, says Spain's anti-terrorist police have been on high alert ahead of elections in two week's time.
"The magnificent efficiency of the Civil Guard has
avoided, without question, a massacre," Interior Minister Angel Acebes told Reuters news agency.
"More than 500 kgs of explosives ... was a cargo that would have caused an explosion with very serious consequences," he said.
The ruling Popular Party had boasted that they dealt Eta a fatal blow with a string of recent high-profile arrests.
Train bombing averted
Recent blows to Eta have included the arrest of four suspects, and the seizure of false identity papers and weapons, by French authorities in December.
One of those captured was suspected military leader Gorka Palacios Alday, 29, who is wanted for a series of bombings in Spain.
That followed the recapture of another suspected key leader, Ibon Fernandez Iradi, 32, who is expected to face charges of terrorism links and attempted murder.
In July last year, Eta carried out a number of bombings around Spain, including a twin bomb attack in Alicante and Benidorm which injured 13 people, two seriously, including several foreigners.
At Christmas, Spanish authorities foiled a plot to blow up trains at a Madrid rail station.
Two bombs, including a 25-kilo (50 lb) device, were intercepted and two men arrested before they reached the capital.