PRETORIA, South Africa (AP) — The deployment of South Africa’s military in northern Mozambique has been extended while its role has shifted from aggressively fighting Islamic extremist rebels to a peacekeeping effort, a top general said Wednesday.

About 600 members of the South African National Defence Force have been in Mozambique’s Cabo Delgado province since October last year and have captured and destroyed several of the extremists’ bases, the chief of the South African mission to Mozambique, Gen. Rudzani Maphwanya said Wednesday.

The South African troops are part of a joint regional force of about 1,000 troops sent by the 16-nation Southern African Development Community to support Mozambique in its battle against the rebels. Other countries contributing troops include Angola, Botswana, Congo, Lesotho, Malawi, Tanzania and Zambia.

Rwanda has also deployed about 2,000 troops as part of a bilateral agreement with Mozambique.

Addressing the media in Pretoria on Wednesday, Gen. Maphwanya said the offensive by the regional force inflicted “massive losses” against the insurgents. The operation destroyed several bases and recovered weapons including grenade launchers, machine guns, AK-47 rifles, vehicles and technological devices, he said.

“During this operation, the SAMIM (SADC Mission in Mozambique) forces faced a strong resistance from the terrorists but were able to inflict fatal casualties and disrupt as well as continue to dominate and pursue the terrorists in the operational area,” said Maphwanya.

Many of the rebels have been forced out of their bases, according to South African National Defense Forces Chief of Staff, Lt. Gen. Lindile Yam.

“A lot has been done to dislodge them,” said Yam, adding that the insurgents are trying to get local residents to join their effort to establish Islamic Shariah law in northern Mozambique. “They are even recruiting children as young as five years old,” he said.

Since 2017, the insurgency in Mozambique has been blamed for more than 3,000 deaths, with more than 800,000 people displaced and more than 1 million in need of food aid, according to the U.N. World Food Program.

A summit of leaders of southern African countries on Tuesday approved the transition of the regional force to a more stabilization role, after its more combative offensive against the rebels.