Vietnamese Prime Minister Nguyen Tan Dung said late Wednesday his government is considering legal action against China to reverse its neighbor's installation of a huge oil-drilling rig in disputed waters of the South China Sea as the struggle for control of the energy-rich region heats up.

Dung’s comments came in a written response to media inquiries and were the first time he has suggested taking legal measures. That's angered China, which says its state-run oil company, CNOOC, has a $1 billion rig that is in sovereign waters 150 miles off the coast of Vietnam. But Vietnamese government officials have said the rig is in its exclusive economic zone.

In an email to the Associated Press, Dung said Vietnam would fiercely defend its territory but would never resort to military action “unless we are forced to take self-defence actions.”

This territorial dispute centers on a widespread group of tiny islands, rocks and reefs that harbor a combined less than three square miles. The Spratly Islands themselves are uninhabitable, making territorial claims more difficult, but ownership of the land could grant ownership to a large swath of the sea floor, believed to hold a wealth of oil and natural gas reserves.

The Spratly Island territory may contain “significant deposits of undiscovered hydrocarbons,” and most of these resources are likely located in the Reed Bank, claimed by China, Taiwan and Vietnam, according to the U.S. Energy Information Administration (EIA). The U.S. Geological Survey estimates that anywhere between 0.8 to 5.4 billion barrels of oil and between 7.6 and 55.1 trillion cubic feet of natural gas await discovery in the region.

China’s rig is located near two existing hydrocarbon blocks created by Vietnam and not yet offered for sale to foreign companies and near the disputed Paracel Islands, 120 nautical miles east of Vietnam's Ly Son Island and 180 nautical miles from China's Hainan Island, according to the Center for Strategic and International Studies (CSIS).

U.S.-based ExxonMobil found substantial oil and gas reserves nearby in recent years, and last year, announced a joint project with Vietnam to build a $20 billion power plant nearby, to be fueled with oil and gas from that area.

Vietnam, meanwhile, also hopes to expand offshore oil and gas production, particularly in the South China Sea largely claimed by China, to meet domestic demand and generate cash for state finances. Major companies like U.S.-based Chevron Corp. and France-based Perenco share contracts with Vietnam’s PetroVietnam for offshore production.

However, prolonged disputes over who owns which waters have in some cases halted drilling.

China’s rapidly growing demand for energy and desire to reduce its reliance on pollution-causing coal-fired electricity has driven its search for natural gas sources. China is aiming to increase its share of natural gas in its energy mix from a present 3 percent to 10 percent by 2020.

On Wednesday, China signed a deal with Russia to buy 1.4 trillion cubic feet of gas per year for 30 years, which is about one-fifth of Chinese gas consumption in 2013 or the annual gas consumption of the state of New York. China has been investing in many oil and gas companies in Africa, the Middle East, and South and North America, including many owned by socialist or authoritarian states, and expanding its own offshore production and domestic shale gas exploration, but has yet to produce substantial amounts of gas.

"Vietnam is considering various defense options, including legal actions in accordance with international law," Dung said in an email sent to Reuters late on Wednesday while on a visit to the Philippines.

"I wish to underscore that Vietnam will resolutely defend its sovereignty and legitimate interests because territorial sovereignty, including sovereignty of its maritime zones and islands, is sacred," he said.

China’s foreign ministry spokesman Hong Lei told the media Thursday that Vietnam is “distorting the facts, conflating right and wrong on the global stage, blackening China and making unreasonable accusations against China.”

"Just who is the one who is repeatedly challenging other countries' sovereignty?” Lei said. “Who is the one who is causing tensions in the seas? Who on earth is destroying peace and stability in the South China Sea? Facts speak louder than words."

The disagreement has brought relations between the two Communist nations to a new low since their border war in 1979.

A 1982 United Nations Convention declares that countries own the waters up to 12 nautical miles from their coastlines and can control resources another 200 nautical miles away from shore, which lends credibility to Vietnam’s claim. China’s Foreign Ministry officers are basing the country’s right to drill there on a claim to one of the Paracel islands, 17 miles north of the rig, which would allow China to claim its own continental shelf in the region, according to CSIS experts.

The Philippines was the first country to put China under international legal scrutiny over disputed claims to the South China Sea in March, when the nation submitted a case to a tribunal in the Netherlands, challenging China’s claims to a reef. Beijing has not participated in the case and warned Manila it would damage ties between the two countries. Vietnam and Taiwan also claim parts of the waters.