A German citizen held captive by the Islamic extremist group Boko Haram was freed on Wednesday after a six-month ordeal, the Associated Press reported.

Eberhard Nitsch had been kidnapped in July 2014 in Nigeria, where the organization has been waging "a ruthless insurgency," the AP noted. His release, however, occurred in the northern part of neighboring Cameroon.

The news service noted that there was confusion about the man's name, with Cameroonian officials identifying the freed hostage as "Nitsch Eberhard Robert" and Nitsch himself writing down "Robert Nitsch Eberhard"; German naming customs suggest that "Eberhard" and "Robert" are the man's first and middle names, while "Nitsch" would appear to be his last name. German media reported his identity as such.

After arriving in Cameroon's capital Yaounde, where he had been flown on a military aircraft, Nitsch told reporters that he had never knews if he would survive the ordeal.

"Until the last minute I did not know if I will survive or I will not survive," he noted at the airport. "It was for me a big problem because there was darkness, totally dark. And then you see nobody around you, and this is a big problem to say if I will survive or I will not survive."

How exactly Nitsch's release came about was not immediately clear. He said he had been kidnapped by Boko Haram fighters while working as a teacher in northeastern Nigeria. During his captivity, Nitsch said he was kept in a dirty room and lost up to 110 pounds. He mentioned his isolation as one of the key challenges he endured.

"You had a long time where nobody talks with you. Nobody," he said.

The German foreign ministry has not elaborated on whether Berlin was involved in possible negotiations over Nitsch's release, CNN noted. The country's ambassador to Cameroon, Klaus-Ludwig Keferstein, meanwhile, thanked the Cameroon government for securing the teacher's release.

A ministry spokesman, Martin Schaefer, echoed the ambassador and underlined the "very good and trusting" cooperation with Cameroon, a German colony between 1884 and 1916. Nitsch, meanwhile, was healthy enough to be transported home, Schaefer added.