The four were among 12 soldiers Cambodia dispatched to the central African nation in recent months to join UN peacekeeping forces.
One Cambodian peacekeeper was killed and seven Moroccans and another Cambodian were injured in the initial ambush on May 8.
Three Cambodian soldiers and one Moroccan peacekeeper were also reported missing, but the three Cambodians were found dead the next day.
UN spokesman Stephane Dujarric said eight fighters from the anti-Balaka rebel group were also killed in the battle. The UN peacekeeping mission said the remaining attackers fled into the bush.
More From This Section
The UN mission sent a helicopter and additional troops to secure the site near Bangassou, about 474 kilometers east of the capital, Bangui, and were continuing to search for the missing peacekeeper, Dujarric said.
The United Nations launched a peacekeeping mission there in 2014 and now has more than 12,000 troops deployed to protect civilians from violence between Christian and Muslim factions. Some 890,000 people have been displaced inside the country and into neighboring Cameroon, the UN says.
The latest fighting began in February and Human Rights Watch said early of the month that at least 45 people have been killed and 11,000 displaced in attacks by armed groups that have also targeted civilians.
One predominantly Peul faction of the mostly Muslim Seleka group has been fighting since late 2016 with another faction that has aligned itself with the Christian anti-Balaka group as they vie for control of the central part of the country, the rights group said.
The bodies of the four were put inside a coffin covered by the Cambodian flag. Buddhist monks chanted before the coffins, with the families standing quietly.
Chhay Chamreun, the 36-year-old wife of one of the dead soldiers, said she was a shocked when she heard that her husband had been killed.
"Now I don't know how I and my three children can survive because my entire family relied on him and now he has passed away," she said, sobbing. "I could not sleep when I thinking about the future of my children and the expense of their studying and living.