JOHANNESBURG -- Their behavior was scandalous: Soldiers traded their guns for gold. They sexually abused children they were supposed to protect. They barricaded themselves in their barracks rather than fight.
And that chaotic U.N. peacekeeping force was actually the better of the two armies fighting a notorious rebel movement in eastern Congo, scene of one of Africa's longest-running conflicts. Meantime, the Congolese army's efforts were led by rival commanders who competed for looting rights. Unpaid soldiers raped and stole with impunity.
Those two forces teamed up last week to stun the M23 rebels -- and many observers -- with a sharp, disciplined campaign that pushed the insurgents to the brink of defeat. They still have to show they can hold the territory they have captured, even with the introduction of surveillance drones planned this month.
But analysts say the success of the campaign so far shows what a United Nations force can do with strong leadership and a mandate to take offensive action. It also illustrates that even a country as unmanageable as the Democratic Republic of Congo has military leaders who can be successful if backed by political will. The lessons could be applied elsewhere in Africa, they say.
"A new type of peacekeeping is being tested now," said Thierry Vircoulon, a regional analyst for the International Crisis Group think tank. "And if it's a success, that may change the whole of thinking about peacekeeping."
"There is a drive for a more militaristic approach to peacekeeping in Congo, but also in other places in Africa," Mr. Vircoulon said. Intractable internal conflicts wrack countries like Ivory Coast and South Sudan.
A succession of rebel groups has long operated along the eastern border of Congo, many of them vestiges of the genocidal conflict two decades ago in neighboring Rwanda. Twelve leaders of M23, the latest such group, have been indicted on suspicion of war crimes by the Congolese government. Another, Bosco Ntaganda, turned himself in and is being tried by the International Criminal Court.
Rwanda has always denied backing the rebels, but the U.S. slapped military sanctions on Rwanda in early October for allegedly backing M23.
Analysts say things started to change late last year after M23 seized control of Goma, the main city in eastern Congo. That galvanized Congolese President Joseph Kabila and U.N. Secretary-General Ban Ki-moon.
"The sight of U.N. peacekeepers equipped with heavy armed vehicles and sophisticated weapons really standing by as a rebel group occupied one of the largest cities in DRC was hugely embarrassing and the complete antithesis of what they were there for," said Darren Olivier, an analyst with the African Defense Review.
In March, the U.N. Security Council endorsed the deployment of a 3,000-member "intervention brigade" to bolster a U.N. force that had grown to about 17,000 since it was first deployed in 1999.
The U.N. force, known by the acronym MONUSCO, had a reputation for being slow and corrupt. It was dubbed #MONUSELESS by critics on Twitter. If a report came in that militias had attacked a village, the force's armed personnel carriers would take hours driving terrible roads to move into position, usually arriving after the worst was over.
The new brigade was the first U.N. force in eastern Congo given a mandate to attack and destroy armed militias rather than wait for them to attack and then try to protect civilians. And it was given new leadership.
German diplomat Martin Kobler became the overall head of the U.N. effort. Brazilian Gen. Carlos Alberto Dos Santos Cruz was appointed its military chief, and quickly announced he would use the most advanced technology available to crush rebel groups that for years had killed civilians, recruited child soldiers and raped women.
A top officer from Tanzania, Brig. Gen. James Mwakibolwa, was chosen to lead the intervention brigade. His soldiers are from regional military powers South Africa, Tanzania and Malawi.
The new unit has used extensive helicopter surveillance to track rebels and has planned and coordinated operations closely with the Congolese army, though it didn't directly participate in the fighting of recent days.
Underscoring its aggressive new approach, the force plans to deploy drones this month. By May, the unmanned aircraft will fly above the steep and leafy hills of eastern Congo 24 hours a day. Analysts say that would make it much more difficult for Rwanda to provide backing for the rebels while denying any involvement.
It wasn't just the United Nations that woke up after Goma fell.
Mr. Kabila replaced the military leadership in eastern Congo and simplified the command structure, Mr. Olivier said.
"That demonstrates that when the Congolese military establishment and president want to have effective military units, they can," Mr. Vircoulon said. "There was a strong consensus from everybody in the DRC against the M23. Even within the opposition, everybody agreed that the M23 had to be defeated."
Experts say there already are signs that Rwanda is distancing itself from the rebels. When rebel commanders tried to call senior Rwandan officials to help them repel the offensive in recent days, the Rwandans weren't picking up the phone, said Jason Stearns on his Congo Siasa blog.
He said the new U.N. approach played a major part in M23's setbacks.
"Observers on the front lines reported that the Congolese soldiers were being issued military rations by the U.N., and that U.N. officers were jointly planning operations with the Congolese army. U.N. attack helicopters have been providing support, although the bulk of the fighting has been carried out by the FARDC [Congolese army]," Mr. Stearns wrote.
M23 lost a large swath of territory in eastern Congo, including the towns of Kibumba, Rumangabo, Rutshuru, Kiwanja and Bunagana, leaving it with only a sliver of hilly terrain along the border with Rwanda.
Timo Mueller, a researcher for the Goma-based Enough Project, which campaigns against genocide and crimes against humanity, said M23's losses weren't all the result of the tough new U.N. approach.
The Congolese army bore the brunt of the fighting and casualties.
Mr. Olivier wrote that government forces in the region "are a far cry from the disorganized, demoralized and poorly trained soldiers who were so easily swept aside when Goma was captured in November last year."
The new commander, Maj. Gen. Bahuma Ambamba, "has transformed the forces under his control, cracking down on ill discipline, improving training especially for combined operations, raising morale and earning a good reputation both amongst his soldiers and the MONUSCO forces," Mr. Olivier wrote.
There were no reports of atrocities by the government forces, which used to be common, he added.
Now, analysts said, they need to show they can hold territory, confront other rebel groups and reestablish government control and services.
The key question, Mr. Vircoulon said, is whether the Congolese army will retain its newfound fighting prowess or slip back into its bad old habits.
"The point is whether this good example can be expanded," he said.