Spain's interior ministry said police detained two Spanish nationals, who were part of a group "that had reached a very high level of determination to carry out terrorist activities".
The group was "fully aligned with the strategy of the terrorist organisation Daesh," the ministry said, using an Arabic acronym for IS.
Police seized a long gun and three knives during searches of six houses carried out as part of the operation in Ceuta, the tiny Spanish territory bordered by Morocco on one side and the Mediterranean Sea.
The Belgian, 18, and the French national, 19, were trying to cross into Serbia early today, a police spokesperson told Hungarian news agency MTI.
Also Read
They were subject to warrants issued for previous "acts in connection with terrorism," Gyorgy Bakondi, Hungarian Prime Minister Viktor Orban's chief security advisor, told public television. No further details were released.
It is the highest alert level since Al-Qaeda-inspired bombers blew up four packed commuter trains and killed 191 people in Madrid on March 11, 2004.
Spain has been mentioned on extremist websites as a possible attack target for historical reasons, given much of its territory was under Muslim rule from 711 to 1492.
Disclaimer: No Business Standard Journalist was involved in creation of this content