(Adds details, background) MOGADISHU, April 24 (Reuters) - A car packed with explosives detonated in Mogadishu on Tuesday, killing four civilians, witnesses said. "Four residents were killed," said one local near the scene who asked not to be named. The vehicle blew up as two Ethiopian military trucks passed it just north of the Ambassador Hotel. One government soldier was injured, he added. The blast shook streets across a wide area and sent clouds of black smoke pouring into the air over the centre of the capital, where battles between allied Somali-Ethiopian troops and Islamist insurgents raged for a seventh day. Civilians have been the main victims of a week of conflict, which local officials say has killed some 300 people. Earlier on Tuesday, a suicide car bomber blew up at an Ethiopian military base on the outskirts of the city, but appeared to have caused few casualties.