A British man who had been held hostage by militants in Libya has been released, the Foreign Office in London said Sunday.