British schoolteacher David Bolam has been released after nearly five months of captivity in Libya, reportedly after payment of a ransom to his Islamist captors.
The Foreign Office in London late Saturday confirmed he was free, saying they were "glad that David Bolam is safe and well after his ordeal and that he has been reunited with his family".
Bolam was kidnapped by militants in May in Libya's second city Benghazi, much of which is under the control of Islamists.
Head teacher at the international school in Benghazi, he is reportedly 53 years old and from Shropshire in western England.
An American teacher from the same school, 33-year-old Ronnie Smith, was shot dead during his morning jog in December last year.
Bolam's captors had contacted the Libyan director of the school to demand a ransom, according to a source at the establishment speaking on condition of anonymity.
The BBC reported that his release had been secured by local political factions and that money had changed hands. It said that Bolam had been flown back to Britain on Thursday.
His kidnapping had not been reported at the request of officials.
Bolam's release follows the beheading of British aid workers David Haines and Alan Henning, among four Western hostages executed since August by Islamic State (IS) jihadists.
American journalists James Foley and Steven Sotloff were also brutally executed by IS militants operating in Syria and Iraq, with all four murders made public in videos.