Four journalists detained since early April have completed an administrative hearing and will be released Tuesday or Wednesday, a government spokesman said.
Spokesman Moussa Ibrahim told The Associated Press on Tuesday that the four had appeared before a judge in an administrative court and were to be freed soon.
Ibrahim gave their names as James Foley, who had been covering the conflict in Libya for the Boston-based news agency GlobalPost, and Claire Morgana Gillis, a freelance journalist who wrote for The Atlantic and USA Today.
He also named Manu Brabo, a Spanish journalist picked up with Foley and Gillis on April 5 near the town of Brega.
It was not immediately clear who the fourth journalist was.
Photojournalist Anton Hammerl, who has South African and Austrian citizenships, went missing in Libya about the time the others were detained.
Ibrahim said the four journalists were returned to detention following the hearing on charges that they "entered the country illegally," suggesting they had not applied for and received visas before arriving to work in Libya.
He also said that arrangements were being made for their repatriation. He did not know if they would be required to pay fines before leaving.
"They should go home today or tomorrow at the latest," Ibrahim said. "After the trial they were returned to external security _ it's like detention."
A number of journalists covering the conflict in Libya have entered the country without visas, especially if they expect to be reporting from rebel-held territory.
Gadhafi's regime has been battling to put down protests demanding his ouster since February. Rebels have taken control of most of the eastern part of the country and other, scattered areas, helped by NATO bombing runs aimed at preventing Gadhafi's forces from attacking civilians.
Foley and Gillis had been visited by an intermediary in mid-May, according to a GlobalPost spokesman, and were reported in good health and being treated well. Foley's family is from Rochester, New Hampshire, while Gillis' parents live in New Haven, Connecticut.
Photojournalist Manuel Varela de Seijas Brabo, who works under the name Manu Brabo, was in touch with his parents by phone at least one.