Turkish President Recep Tayyip Erdogan has denounced the Kurdish independence referendum, and will not rule out a potential military action to stop efforts to usurp his country's territory.

The warning came as people in the Iraqi autonomous region voted on Monday in an independence referendum, amid rising tensions and international opposition.

Balloting took place in the disputed areas between the northern city of Erbil and the capital Baghdad, as well as the oil-rich province of Kirkuk, which is ethnically mixed.

"Our armed forces are on the borders with Iraq to do whatever it takes," Erdogan said, adding that Turkey could block key oil exports of the Kurdish Regional Government (KRG) over the vote.

"We will never allow anyone or anything to go from Turkey to Iraq. This week we will adopt so many other measures. We will close the borders. Nothing will go across the borders."

READ MORE: Regional implications of the Kurdish independence vote

"Entrance-exit will be closed" at the Habur border crossing, Turkey's sole land border crossing with Iraq, Erdogan said in a speech in Istanbul.

He said there were currently crossings allowed to the Iraqi side only but travel would be closed in both directions this week.

"After this let's see through which channels they will send their oil through ... and who they will sell to. The valve is with us. It's finished the moment we close it," he said.

Iraqi Kurdish oil is exported through Turkey and its southern Ceyhan port, a key economic lifeline for the region.

'Null and void'

Erdogan said "irrespective of the result, we see this [referendum] as null and void and say it is illegitimate."

He also said Turkey was ready to take "all the steps" needed "on political, economic, trade and security fronts" and appeared not to rule out military action.

Last week the Turkish armed forces began a military drill in the region around the border town of Silopi, including 100 military vehicles, which continued with reinforcements this weekend.

Erdogan warned the KRG of a cross-border operation by the Turkish army similar to that taken in northern Syria last year against the Islamic State of Iraq and the Levant (ISIL) group and Kurdish armed fighters.

Aside from Turkey, the Iraqi central government and Iran also strongly oppose the referendum.

There are fears it could increase the separatist aspirations of Kurds in the region.

Five million people across northern Iraq are eligible to vote in Monday's referendum.

Al Jazeera's Andrew Simmons, reporting from Habur in Turkey near the Iraqi border, said that while Turkey is ratcheting pressure on the KRG, there is "very little action" so far on the ground.

He said it will take a few days before it would be clearer what kind of action Turkey makes, adding that there have been reports that Baghdad has asked Ankara to halt flights between Turkey and the Kurdish region.