A suicide bomber blew up a vehicle packed with explosives at the interior ministry's intelligence headquarters in central Baghdad on Saturday, killing at least six people, security officials said.
At least 32 people were wounded in the blast, the officials added.
The headquarters is protected by concrete blast walls, but the security forces on guard at its entrance on an often-crowded intersection are easy targets for attack.
Signup to our newsletter and follow us on Facebook and Twitter!
There was no immediate claim of responsibility for the blast, but suicide bombings are a hallmark of Sunni jihadists, including those loyal to the Islamic State (IS) group.
IS-led militants launched a major offensive across Iraq in June, overrunning large areas of five provinces and sweeping security forces aside.
Kurdish forces backed by US air strikes in the north have begun to regain ground lost during a renewed assault by the militants earlier this month, but Iraqi federal security forces are still struggling to claw back lost territory.