The Libyan government says it has freed four foreign journalists detained for illegally entering the country.
Those freed were two Americans, James Foley and Clare Morgana Gillis, Spanish photographer Manu Brabo and a Briton named as Nigel Chandler. The fate of a South African photographer is unclear.
Government spokesman Moussa Ibrahim said those freed could stay and report in the country, Reuters said.
The Libyan government has been fighting an uprising since February.
James Foley works for GlobalPost and Clare Morgana Gillis is a freelancer.
They were detained with Manu Brabo on 4 April.
Nigel Chandler is a freelance journalist who has worked for the BBC.
Ms Gillis, who writes for the Atlantic and USA Today, told the Associated Press news agency the four were at Tripoli's Rixos Hotel and were fine.
She said a judge had given them a suspended one-year sentence.
Mr Ibrahim said the four were welcome to stay but they would be escorted to the Tunisian border if they wanted to leave.
He said: "We know that there are foreign, special, European army experts fighting with the rebels so the army do not know immediately that these people are journalists, that they are harmless.
"If anyone was mistreated then we extend our apologies."
The fate of South African photographer, Anton Hammerl, also held on 4 April, is still unclear.
Nato is currently carrying out air strikes across Libya under a UN mandate to protect civilians from the forces of Col Muammar Gaddafi, who is trying to crush the three-month-old uprising.
Nato attacks have recently concentrated on what the alliance says are military and logistics hubs in Tripoli.