Iraqi officials say their security forces have reached the Baiji oil refinery after driving out Islamic State (IS) fighters from the area.
Gen Abdul Wahab al-Saadi told Iraqi state TV that this could be the "main key in liberating each span of Iraq".
The refinery, Iraq's largest, was besieged by IS for five months.
IS seized large swathes of Iraq almost unopposed in a June advance and has been the target of a US-led air campaign since August.
Police Colonel Saleh Jaber, from the Baiji refinery protection force, told Reuters news agency that an Iraqi "anti terrorism" force called the Mosul Battalion had entered the refinery on Tuesday.
IS fighters had first laid siege to the Baiji refinery in June after taking control of the nearby town of Baiji in a lightning advance through northern Iraq.
Iraqi troops regained control of the town, which lies about 10km (six miles) from the refinery, on Friday.
Iraqi war planes then targeted fleeing IS fighters in the surrounding area, according to Reuters.
The BBC's Hugh Sykes in Baghdad says that regaining control of the area, only 200km (130 miles) north of Baghdad, could be a turning point in the fight against IS militants.
The Baiji area could now be used as a base for trying to drive IS out of towns further south and perhaps later on in an attempt to recapture Mosul, Iraq's second largest city, which is still under IS control.
Triumphant Iraqi soldiers celebrated the victory on state TV.
An Iraqi reporter said that the security forces had "made the refinery a graveyard" for IS.
Around 200,000 people live in the town of Baiji, and the refinery accounts for about a quarter of Iraq's oil production.
It was producing around 175,000 barrels of oil per day before it was closed because of the fighting.