"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.
Spanish Interior Minister Jorge Fernández Díaz said in an interview published on Sunday that Madrid wants the 1995 treaty modified to check the movements of Islamist militants returning to Europe after fighting in the Middle East.
"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 País.
His comments were made just before EU and US security ministers met at France's interior ministry on Sunday 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.
The Schengen agreement has been signed by 26 countries, 22 of them EU members. It imposes border controls on individuals entering and leaving the zone, but none on travels within the bloc. The treaty cannot be changed unilaterally.
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.
The wanted partner of one of the gunmen behind the terror attacks in France, Hayat Boumeddiene, crossed into Syria last week after arriving in Turkey on a flight from Madrid, Turkish authorities said on Monday.