Four foreigners who were arrested by Sudanese authorities and held for three weeks were on a U.N. mine clearing mission along the disputed border with South Sudan, a relief agency said Friday.

The Norwegian, Briton, South African and South Sudanese soldier were all freed in Sudan on Sunday. John Soerboe, a 50-year-old relief worker for Norwegian People's Aid, returned home Friday.

African Union mediator Thabo Mbeki facilitated their release, said the Norwegian People's Aid and Britain's Foreign Office.

Soerboe said in Oslo that the four had identified themselves as U.N. workers when they were arrested on April 29 in the Heglig border region by Sudanese soldiers firing weapons nto the air. Violence between Sudanese and South Sudanese forces had spiked in that area.

"We introduced ourselves and told them we are on a mission for the United Nations. They asked us if we cleared the mines they had put out, and we acknowledged," Soerboe said in a statement released by his agency. "So we were blindfolded and we got hit in the head."

Soerboe said he was working with Briton Chris Fielding from the United Nations, Peter Monyluak of the South Sudan Mine Action Authority, and Thabo Siave of the South African demining organization Mechem.

Britain's Foreign Office has confirmed that Fielding was freed on Monday, and Foreign Office Minister David Lidington said the Briton was "healthy and was well treated by the Sudanese while he was in detention."

On Twitter, Norwegian Foreign Minister Jonas Gahr Stoere said Friday that he has met with Soerboe who is "in a good shape, high spirits. He's a good man."

Soerboe said the Sudanese authorities thought they were spies or mercenaries who had entered Sudan illegally.