The agreement foresees the creation of a permanent Franco-Spanish intelligence team charged with fighting terrorism "in all its forms" the French president's office said in a statement.
"France will always be beside Spanish democracy in the face of the cancer of terrorism, whether it is internal terrorism or external terrorism,'' Sarkozy told a news conference.
Zapatero said the agreement was aimed at preventing attacks, and warned that Eta, the Basque separatist organisation, would suffer the "consequences" of abandoning a ceasefire last year.
France and Spain also agreed to conduct joint operations to send home illegal immigrants, but gave no details on how the expulsions would be carried out.
Zapatero called it logistical co-operation.
The Franco-Spanish summits were set up in 1985 on the occasion of Spanish King Juan Carlos's visit in France.
The last summit was held in the Spanish city of Girona in November 2006.