JUBA, South Sudan -- South Sudan's rebels have released 13 United Nations contractors held captive for nearly a week, the UN's mission in the country said.

The contractors were the crew of a convoy of three barges carrying 55,000 litres of fuel along the Nile River to a UN base in the war-torn Upper Nile state which was detained by the rebels on Monday, October 26, the UN said in a statement Sunday. Rebels control the river's west bank. The UN has bases on the government-controlled east side of the river.

The barges were returned to the UN, but the rebels have kept the fuel as well as communications equipment, an inflatable boat, and seven of the peacekeepers' weapons, according to the UN statement.

Nyagwal Ajak Dengkak, spokesman for the rebel commander in the area, confirmed to The Associated Press that the rebels released all captives including barges.

The rebels said they took the vessels because they thought they were delivering weapons to government troops and carried army soldiers and members of the domestic spy agency.

The government army, in turn, accused the UN of assisting the rebels. Chief of the UN mission in South Sudan Ellen Loj denied the barges were carrying any weapons cargo, and said all the fuel was meant for UN use.

Some South Sudanese nationals working for UN agencies have been kidnapped and killed in the past along the Nile, according to the UN

South Sudan has been at war since 2013 between President Salva Kiir's forces and rebel leader Riek Machar. Although the warring factions signed a peace deal in August, fighting persists, especially the contested states of Upper Nile and Unity.