Hours after announcing the capture of 49 international peacekeepers and three Sudanese, rebels from the Justice and Equality Movement, or JEM, in Sudan's Darfur have released them, according to Reuters.

According to Reuters, the soldiers are members of the joint United Nations-African Union peacekeeping force, known as UNAMID. Most of them are from Senegal, and others from Ghana and Yemen.

More from GlobalPost: Sudan says it killed main rebel leader

"All peacekeepers are free but we are holding three Sudanese accompanying them," a JEM spokesman was quoted as saying.

Earlier on Monday, JEM spokesman Gibreel Adam Bilal had told the news agency: "We are holding the UNAMID soldiers because they entered our territory without permission and because they were accompanied by three Sudanese we suspect work for the security services."

JEM accuses the international force of helping Sudan spy on areas it controls, according to Bilal. If that is found to be the case, the group will demand that the UN fire the head of the UNAMID mission, he said.

A UNAMID spokeswoman was quoted as telling Reuters that, while the peacekeepers had been released, they were not leaving the area while the three civilians remained in captivity.

The BBC noted that relations between JEM and the peacekeeping force had not been particularly good recently.

JEM is one of several rebel groups in the west and south of Sudan fighting against the government. In late December, the Sudanese armed forces announced they had killed JEM's leader, Khalil Ibrahim.

More from GlobalPost: George Clooney's solutions for Sudan