The blast at the entrance to the town of Khales also wounded 36 people, according to Hassan al-Mamuri, the local official responsible for the area, and Faris al-Azzawi, the spokesman for the Diyala province health department.
There was no immediate claim of responsibility for the attack, but the Islamic State jihadist group carries out frequent suicide bombings in Iraq.
The blast came a day after a suicide bombing claimed by IS killed at least 15 people in Baghdad’s Kadhimiyah neighbourhood.
IS overran large areas north and west of Baghdad in 2014, but Iraqi forces have since regained significant ground and are conducting operations to set the stage for the battle to recapture Mosul, the last IS-held city in the country.
The jihadists have responded to the battlefield setbacks by striking civilians, and experts have warned there may be more such attacks as the jihadists continue to lose ground.
A suicide bombing claimed by the Islamic State (IS) group killed at least 15 people in a Shiite area of northern Baghdad on Sunday as per security and medical officials said.
The bombing, which struck near a checkpoint in the Kadhimiyah area, home to a major Shiite shrine, also wounded at least 29 people.
IS issued a statement claiming the attack, saying it targeted soldiers and pro-government paramilitaries in the area.
The jihadist group frequently carries out attacks on security forces, and also often targets members of Iraq’s Shiite Muslim majority, whom it considers heretics.