BAGHDAD — Kurdish separatists in northern Iraq surrendered all disputed oil fields to Iraq’s military on Tuesday, retreating in the face of overwhelming force that appeared to halt, at least for now, their independence hopes from a referendum held less than a month ago.

In a swift and largely nonviolent operation that came a day after Iraqi forces reclaimed the contested city of Kirkuk from the Kurdish separatists, Baghdad’s troops occupied all oil-producing facilities that the separatists had held for three years, and which had become critical to the Kurdish autonomous region’s economic vitality.

The loss of those resources will erase billions of dollars in export earnings that has flowed to the Kurdish region from the sale of oil. Kurds took over the disputed areas adjacent to their region after Iraqi troops fled an assault by the Islamic State extremist organization in 2014.

Those areas were included in the Sept. 25 referendum in which the Kurdish region voted overwhelmingly for independence. The vote angered not only the central government in Baghdad and the United States, but also neighbors Turkey and Iran, which have sizable Kurdish populations.