AFP's photographer in the Libyan city of Benghazi, Abdullah Doma, was released on Wednesday night after a 24-hour detention by the security services over his coverage of a public concert.
"I've just been freed," Doma said, adding that he had been questioned but had not been charged with any offence.
Security services of eastern Libya raided Doma's home on Tuesday night and told the family he was to be questioned over his photo coverage for AFP of an Earth Hour event.
Two organisers of Saturday night's event at Benghazi university, where young men and women gathered for a concert, were detained at the same time as Doma but released on Wednesday morning.
Awqaf religious authorities linked to the authorities in the east had condemned the marking of Earth Hour in Benghazi as "offensive" to Islam because it went against the segregation of the sexes.
AFP management had expressed concern over Doma's arrest and called on authorities in Benghazi to release the photographer immediately and without charge.
Contacted by AFP, sources with the Libyan National Army of Khalifa Haftar, which controls eastern Libya, said the military was not involved in the arrest.
Millions of people from a record 187 countries and territories took part this year in the annual bid to highlight global warming, according to the conservation group WWF.
Benghazi is controlled by Haftar's military authorities which contest the legitimacy of Libya's UN-backed Government of National Accord which is based in the capital Tripoli.