(CNN) -- Ethiopian forces in Somalia have killed at least 46 civilians after a roadside bomb ripped through their military convoy, residents said.
The violence happened Friday on the road linking Mogadishu to the agriculturally rich town of Afgooye, residents said.
The civilians were riding in two minibuses traveling on the same road, they said.
"There was huge explosion, which blew one of the Ethiopian military vehicles off the road," said Omar Nur Abdirahman, who lives in Arbiska, scene of the incident. "Afterward, Ethiopian soldiers started shooting people in the two minibuses wildly."
The Ethiopians are backing Somalia's transitional government.
Omar said he and others fled to the nearby forest as the Ethiopian forces began shooting everywhere.
Another witness -- Anab Abdi Dirshe, who had been trapped in the area since the shooting -- said she and other residents have counted at least 46 dead civilians, mostly women.
Some of the dead were recovered from the forest on the side of the road, indicating some passengers tried to escape the shooting, she said.
"My children and I were hiding somewhere near our house because the Ethiopian forces didn't leave the area quickly, even after the massacre of the civilians on the buses, so we were so afraid that they would see us and shoot us," said Dirshe, who was packing her belongings and attempting to move her family from the area.
Dirshe said many victims may have lain dying for hours, adding the road was closed until Saturday morning.
"We were hearing screams in the evening, and those screams stopped later," she said.
The presence of Ethiopian troops trying to help defend the transitional government's hold on Mogadishu has united Islamic militant groups seeking to gain control of the city.
In 2006, the Islamic Courts Union, a militia group, ousted Somalia's transitional government from power. But the ICU was deposed in December of that year following Ethiopia's military invasion.
Since then, insurgent groups have been trying to destabilize the government.
Somalia's government is trying to maintain control of the capital, with the help of the better-equipped Ethiopian forces.
In a separate attack inside Mogadishu, five people -- including a father and a son -- were killed after a roadside bomb exploded on a road as Somalian and Ethiopian forces were deployed ahead of a presidential motorcade.
The explosion triggered a barrage of gunfire, resulting in the five deaths.
Somali government spokesman Abdi Hagi Gobdon confirmed that security was deployed to Maka Al Mukarama Road as the country's president, prime minister and parliament speaker were flying from the city.
Journalist Mohamed Amiin contributed to this report.