Four hostages -- employees of the Iraqi North Oil Company -- were taken captive after four attackers, believed to be wearing suicide vests, stormed the Bai Hassan oil field northwest of Kirkuk on Sunday, the source said.
One of the attackers blew himself up when security forces responded. The other attackers were later killed by security forces.
The ISIS-affiliated Amaq news agency released a statement claiming responsibility for the attack, which was widely circulated by the terror group's supporters on social media networks.
The standoff was the second armed attack on an energy facility in the Kirkuk region Sunday, following an earlier deadly attack on a nearby gas compression facility owned by the same company.
4 killed in earlier attack
Four staff were killed and another was injured during that attack on the gas facility, known as AB, in the Bajwan area in northwestern Kirkuk, police Gen. Sarhad Qader said.
The attackers fled to an unknown location after being pushed back by security forces, but planted several bombs near the facility before they left, Qader said.
No one has claimed responsibility for that attack.
ISIS has previously coordinated attacks on energy facilities in the oil-rich region.
Kirkuk is one of Iraq's disputed areas, claimed by both the central government in Baghdad and the Kurdistan Regional Government.
Production at Bai Hassan, which pumps crude via a pipeline to the Turkish port city of Ceyhan, remains temporarily halted in the wake of the attack, the security source said.