China's Defence Ministry said on Thursday its aircraft followed the rules after two Chinese fighter jets carried out what the United States said was an "unsafe" intercept of a U.S. military reconnaissance aircraft over the South China Sea.

The incident took place in international airspace last week as the plane carried out "a routine U.S. patrol", the Pentagon said.

A U.S. defense official said two Chinese J-11 fighter jets flew within 50 feet (15 meters) of the U.S. EP-3 aircraft. The official said the incident took place east of Hainan island.

Chinese Defence Ministry spokesman Yang Yujun told a monthly news briefing China's aircraft acted completely professionally and in line with an agreement reached between the countries on rules governing such encounters.

However, he said the agreement, called the Rules of Behaviour for Safety of Air and Maritime Encounters, could only provide a "technical standard", and the best way of resolving the problem was for the U.S. to stop such flights.

"That's the real source of danger for Sino-U.S. military safety at sea and in the air," he said.

The encounter came shortly after China scrambled fighter jets as a U.S. Navy ship sailed close to a disputed reef in the South China Sea.

Another Chinese intercept took place in 2014 when a Chinese fighter pilot flew acrobatic maneuvers around a U.S. spy plane.

China claims most of the South China Sea, through which $5 trillion in ship-borne trade passes every year. The Philippines, Vietnam, Malaysia, Taiwan and Brunei have overlapping claims.

Washington has accused Beijing of militarizing the South China Sea after creating artificial islands, while Beijing, in turn, has criticized increased U.S. naval patrols and exercises in Asia.