Image copyright AFP Image caption Both sides have complained of harassment and intimidation

Chinese officials have accused vessels from Vietnam of launching more than 1,400 ramming raids on its ships near a drilling rig in the South China Sea.

The foreign ministry said in a statement the actions were illegal and called on Hanoi to stop "provocations".

China moved the drilling rig on 2 May, helping to spark anti-Chinese riots in Vietnam in which four people died.

Hanoi says the rig is within its waters and has called on China to stop its exploration in the area.

The South China Sea is host to overlapping territorial claims by a number of countries.

Beijing claims almost the entire sea, based on a mid-20th Century map with a line apparently delineating Chinese territory, and vague historical claims going back more than 1,000 years.

Image copyright Reuters Image caption The seas are heavily patrolled by both Vietnamese and Chinese ships

Image copyright Reuters Image caption Nationalist sentiment is running very high in Vietnam over the South China Sea dispute

Image copyright Reuters Image caption Vietnam has shown images of its vessels being sunk by Chinese ships

The drilling rig is near the Paracel Islands, a grouping claimed by both China and Vietnam.

Hanoi argued that the rig was inside its Exclusive Economic Zone (EEZ), usually defined as within 200 nautical miles of a country's coast.

However, in its most detailed defence of the rig manoeuvre so far, China's foreign ministry said the drilling operation fell "well within China's sovereignty and jurisdiction".

"The two locations of operation are 17 nautical miles from both the Zhongjian Island of China's Xisha Islands [Paracels] ... yet approximately 133 to 156 nautical miles away from the coast of the Vietnamese mainland," the statement said.

Vietnam-China tensions

Image copyright Reuters

China backs North Vietnam during the Vietnam war

1974 : China and South Vietnam fight a war over the Paracel Islands; China seizes Vietnam-controlled islands.

: China and South Vietnam fight a war over the Paracel Islands; China seizes Vietnam-controlled islands. After war, Hanoi moves closer to Russia, angered by Beijing's support for Khmer Rouge

1979: China and Vietnam fight a border war; thousands of troops die

China and Vietnam fight a border war; thousands of troops die 1988: Two sides fight over the Spratly Islands; about 60 Vietnamese sailors killed

The statement complained of "serious infringements upon China's sovereignty, sovereign rights and jurisdiction".

"As of 5pm on 7 June, there were as many as 63 Vietnamese vessels in the area at the peak, attempting to break through China's cordon and ramming the Chinese government ships for a total of 1,416 times," it said.

The statement goes on to give a lengthy justification of China's territorial claims.

Among the authorities it cites are the fact that a Chinese flag was hoisted on the islands in 1911, and that a Vietnamese school textbook from 1974 allegedly referred to the Paracels as Chinese.