MADRID - Spain says Prime Minister Jose Luis Rodriguez Zapatero will visit Libya this week because Moammar Gadhafi wants to thank his government for helping mediate a two-year dispute between Libya and Switzerland.

Zapatero's office said Tuesday he'll travel Thursday to Tripoli and meet with Gadhafi and Libya's foreign minister.

Earlier this month Libya and Switzerland struck a deal to end the dispute, which began with the detention of Gadhafi's son Hannibal and his wife for allegedly beating their servants in a Swiss hotel in 2008.

Libya arrested two Swiss businessmen and tried them for violating residency laws and operating a business illegally. One was acquitted and allowed to leave in February. The other returned June 13 after the countries ended the spat.