MADRID: Spain and Libya have reached a framework agreement that could see Spanish firms invest around $17 billion in Libya, the government said Tuesday. The agreement was reached in talks Monday evening between Prime Minister Jose Luis Rodriguez Zapatero and Libyan leader Moammar Qaddafi, who is making his first official visit to Spain. The deal, which still has to be fleshed out, could see Spanish firms invest $5 billion (3.47 billion euros) in the Libyan energy sector, 2 billion euros ($2.88 billion) in defense and aeronautics and up to $10 billion in a huge Libyan project to develop the country s infrastructure, Zapatero s office said in a statement. It didn t explain why the figures were given in different currencies. Officials said so far no Spanish firms have been selected to carry out the investments. During the talks, Zapatero said Libya s process of seeking reconciliation with the West after decades of hostility is yielding benefits for both Libya and the European Union. Qaddafi, long a vocal champion of armed struggle and once ostracized by the world community as a state sponsor of terrorism, has been trying to build normal relations with European countries after renouncing terrorism and nuclear weapons. Qaddafi visited France last week. French President Nicolas Sarkozy thus became the first Western leader to offer Qaddafi an official visit since his falling-out with the West in the 1980s. Spain is the second country to allow a visit. The Libyan leader wrapped up his visit Tuesday by having lunch with King Juan Carlos, meeting Spanish business leaders and visiting the Madrid town hall.