The military ceremony Wednesday was meant to be a fresh beginning, an army being reconstituted after months of bloodshed, in front of a new interim president who declared how proud she was of the nation’s soldiers.

But moments after the ceremony ended, the past returned with vengeance.

A group of uniformed soldiers, witnesses said, spotted a man in the crowd who they suspected was a former rebel. They grabbed him and stripped off his clothes. Within seconds, he was stabbed to death with knives and machetes. One soldier stomped on his face; another dropped a huge slab of rock on his head. They chopped off one of his legs, the other foot and a hand. The soldiers dragged the corpse onto a busy avenue, as African peacekeepers watched.

Then the soldiers grabbed tires from a nearby repair shop, threw them on the corpse and set it on fire. They posed for pictures, smiling with the burned corpse. Many bystanders approved of the man’s brutal end. Revenge had become part of their society’s fabric.

“We think it was okay that the soldiers killed him,” said Junior Mazongo, 27, an employee at the tire repair shop. “In Africa, you take my eye, and I will take yours. You take my arm, and I will take yours.”

Wednesday’s lynching was the latest disturbing sign of how far the Central African Republic, one of the world’s poorest countries, has disintegrated into a spiral of atrocities. The Seleka rebels seized power in a military coup in March, and since then, thousands of civilians have been killed and displaced as clashes between the mostly Muslim rebels and Christian militias have engulfed this Christian-majority nation.

Last month, Michel Djotodia, the president installed by the rebels, resigned after pressure from regional countries in a bid to bring peace, and an interim president, Catherine Samba-Panza, filled his position. But those efforts have failed to stop the violence. Today, about 6,500 French and African peacekeepers are struggling to stem the brutalities.

Wednesday’s violence also unveiled the tense environment in the capital. Even as the peacekeepers patrol the streets of Bangui and traffic has returned to normal in many areas, pockets of insecurity prevail. Sporadic gunfire explodes during the day. Muslim areas are still being looted; the streets empty by sundown.

Nevertheless, the military ceremony was imbued with a sense of optimism. Samba-Panza pledged to secure most of the country “within a month” and vowed to go after anyone who fomented instability. “At a certain point, everyone will be held responsible for their acts,” she said in her address to the roughly 4,000 officers and soldiers. “I am warning troublemakers who continue to sow disorder in the country.”

Shortly after Samba-Panza left, the soldiers targeted the alleged former rebel.

It was unclear whether he was a Muslim or Christian, but many witnesses suspected that he was a Muslim because of his alleged ties to the rebels.

Peter Bouckaert, emergencies director for Human Rights Watch, arrived shortly after the man was killed. He said the African peacekeepers were there but did nothing. A short while later, French soldiers arrived.

“The body was completely on fire,” Bouckaert said. “People were taking photos, kids were standing around watching. The French troops walked up to the body and told people to back away.”

“Then a woman came up to me and said, ‘We’ll eat him after he is cooked,’ ” Bouckaert said.

“And then this guy walks up with the man’s leg. The soldiers just gasped. They are like, ‘Put it down,’ so he throws it into the fire, and he leaves. They just let him leave.”

Afterward, local Red Cross workers came and carried away the remains. Within moments, traffic returned to the avenue, as the sidewalk craftsmen and employees of the tire repair shop went back to work. The only evidence of the lynching was the charred black patch on the road.

Many of the soldiers involved in the killing could be identified in photos. Bouckaert said it was essential for Samba-Panza to condemn this “act of barbarity” and hold the perpetrators accountable.

“This was a beautiful moment this morning,” Bouckaert said. “It was a moment of hope that suddenly turned into a moment of absolute horror once again. I have been here this time for two weeks, and I have seen five lynchings, or attempted lynchings. It’s not calming down. The horror is still unfolding.”