IS suicide attack kills 7 at Iraq power plant
The Islamic State group claimed responsibility for the attack.
"They attacked the plant's workers, killing seven and wounding 12, according to an initial assessment," the official told AFP on condition of anonymity.
Two of the bombers were killed when security reinforcements arrived at the scene and evacuated the building.
"At 2am we were woken up by shots being fired," Abdel Salam Ahmed, one of the employees who was hit by gunfire in the legs, told AFP from his hospital bed.
He recalled running with colleagues away from the shooting.
"We ran into one of them (the jihadists). Some of us hid while two others kept running towards the exit, shouting 'we are employees', but they (the attackers) shot them dead," he said.
Prefabricated houses where employees were sleeping were destroyed as explosions rang out in the power plant, an AFP reporter said.
The attack came as Iraqi Shias marked the first day of the Eid al-Adha feast that follows the conclusion of the Hajj pilgrimage.
IS, which frequently carries out suicide bombings in Iraq, claimed responsibility for the attack.
In 2014, IS captured almost a third of Iraqi territory in a lightning offensive.