MADRID (AFP) Pakistan and Spain expressed their joint commitment to fight terrorism as they signed a broad bilateral agreement Wednesday aimed at enhancing cooperation on security, trade and other issues. The deal came during a meeting between Spanish Prime Minister Jose Luis Rodriguez Zapatero and his Pakistani counterpart Yousuf Raza Gilani, who is on the highest level visit to Spain since then-president Pervez Musharraf in 2007. The commitment by both governments in the fight against terrorism is a commitment to collaborate, Zapatero, whose country holds the rotating presidency of the EU, told a joint news conference after the talks. I am very grateful to Pakistan and thank you for the efforts you have made to fight against radicalism and terrorism in the region... I would like you to know that you can count on Spain for the stability of Pakistan. Gilani noted that Spain and Pakistan have both been victims of terrorism, and both countries are cooperating to root out this menace. Pakistan, which borders war-torn Afghanistan, has suffered from increasing attacks by radicals in recent years as it fights a home-grown Taliban insurgency. The Spanish government announced in February it was sending 511 more troops to Afghanistan, boosting its contingent with NATO-led forces fighting Taliban insurgents to nearly 1,600. Spain suffered its worst ever terror attack on March 11, 2004 when bombs exploded on packed commuter trains in a Madrid suburb, killing 191 people and wounding 1,841 others. In December a Spanish court convicted ten men from Pakistan and one from India in connection with a plot to stage suicide attacks on the Barcelona metro in 2008 which it said could have caused many casualties. Gilani said the two countries signed a framework of cooperation agreement covering diverse fields from trade and finance to science and technology, from defence and security to cultural and people-to-people contacts. They also signed a deal to avoid double taxation, which Zapatero said opens up a whole array of economic relations in the future. Gilani is to continue from Madrid to Brussels for an EU-Pakistan summit and a visit to NATO headquarters. He had been scheduled to come to Europe in April but the visit was cancelled because of the air transport chaos caused by an Icelandic volcano.