"No decision has been taken regarding the question of whether or not to change the Schengen treaty," Mariano Rajoy said during an interview with Cadena Ser radio.
"If the question is posed it will be debated but I think that everything that helps the fight against terrorism must be done, as long as it does not harm other things. I think that everything is perfectly compatible," he added.
"Those people over whom there is a well founded suspicion or risk that they may be terrorists or who are susceptible of being terrorists, should not use this freedom of movement to the detriment of our freedom and security," the minister told daily newspaper El Pais.
His comments were made just before EU and US security ministers met at France's interior ministry yesterday to work out a joint response to the threat of jihadist attacks following days of carnage in Paris by three gunmen claiming to act on behalf of Al-Qaeda and the Islamic State group.
More From This Section
The agreement nevertheless already allows member countries to temporarily reinstate border controls if deemed necessary for security reasons, such as big sporting events like the Olympic Games or to address temporary threats.
Spain is also pushing for the swift adoption of European legislation requiring airlines to provide data of passengers entering or leaving the EU.
Adoption of the Passenger Name Record Directive was suspended by the European Parliament late last year because of concerns about data protection.