The Vietnamese government vowed to protect foreign oil companies operating at its continental shelf and within its exclusive economic zone amid a dispute with China, state media reported Friday. "Vietnam is committed to protecting the legitimate interests of foreign partners operating in Vietnam," the Viet Nam News newspaper quoted Foreign Ministry spokesman Luong Thanh Nghi as saying in a statement relayed by Vietam News Agency (VNA). Nghi made the comment after China on Wednesday warned Russia to stay away from the South China Sea. Vietnam National Petroleum Corp and the Russian energy giant Gazprom agreed April 5 to exploit oil and gas in two blocks in a disputed area of the South China Sea, after BP Plc withdrew from a 2-billion-dollar investment in 2009 because of Chinese pressure. China has also opposed oil exploration by India's ONGC Videsh Ltd in the same area with Vietnam National Petroleum. Tensions between the two countries have risen in the past three years after China claimed most of the South China Sea. The islands there are also claimed in whole or in part by the Philippines, Brunei, Malaysia and Taiwan. China and Vietnam fought a brief but violent border war in 1979, but economic and diplomatic ties have gradually improved over the past decade. Last year, Vietnam accused its neighbour of harassing fishing boats and cutting the cable of a survey vessel in disputed seas.