Hannibal Gaddafi's arrest sparked the diplomatic spat
The European Union and Libya have lifted bans on granting visas to each others' citizens.
Spain - which holds the EU presidency - said the names of Libyans had been removed from a list barring them from the 25-state Schengen visa-free area
The Libyans responded by dropping a reciprocal retaliatory measure.
The European ban was imposed on the initiative of Switzerland, which has been embroiled in a long-standing diplomatic row with Libya.
Switzerland is a member of the Schengen area, but not part of the EU.
The Spanish Foreign Ministry said in a statement that it "regretted" the Libyans had been placed on the blacklist.
"All the names of the Libyan citizens included in the list of the Schengen information system have been removed," the statement said.
"We regret and deplore the trouble and inconvenience caused to those Libyan citizens. We hope that this move will not be repeated in the future."
Libya said it was also lifting its restrictions "in the interests of strengthening co-operation with the European Union", according to a statement reported by the official Jana news agency.
Spanish foreign minister Miguel Angel Moratinos is currently visiting Libya to try to resolve the dispute with Switzerland.
On Saturday he held talks in the city of Sirte, where Libyan leader Col Muammar Gaddafi is hosting a summit of the Arab League.
The row began two years ago when a son of Col Gaddafi, Hannibal Gaddafi, was arrested in Geneva on charges of mistreating two domestic employees.
The charges were swiftly dropped and Hannibal Gaddafi was released, but Libya stopped oil exports to Switzerland, withdrew millions of dollars from Swiss banks and refused visas to Swiss citizens.
Libya also detained two Swiss businessmen, accusing them of tax evasion and operating a business without a licence.
The Schengen area is a borderless travel zone grouping of 22 EU nations plus Switzerland, Norway and Iceland.