The officials say the blast went off on Muthanna street on the west side of the city. The officials spoke on condition of anonymity because they were not authorized to speak to the media.
There was no immediate claim of responsibility for the bombing Friday evening, the latest in a string of attacks along roads and in villages in areas north and west of Baghdad.
The Islamic State group has claimed many of them. Iraq claimed victory over the organization in 2017 after a four-year war but the group has stepped up its attacks in towns and cities outside Baghdad and the country's north in recent weeks.