Updated

China's first aircraft carrier has successfully completed sea trials in the South China Sea, state media reported.

The Liaoning returned to port Wednesday after a 37-day voyage, the official Xinhua News Agency said.

Citing an unnamed naval source, Xinhua said the aircraft carrier tested its combat system and conducted a formation practice and "attained the anticipated objectives."

"All tests and training programs went well as scheduled," it said.

Aircraft, naval vessels and submarines also participated in the Liaoning's tests.

Early in the Liaoning's trial run one of the Chinese ships accompanying it was involved in a near collision with a U.S. Navy ship, which a Chinese media report said was down to the U.S. ship getting too close to the Liaoning. It marked the two countries' most serious sea confrontation in years.

The U.S. Pacific Fleet said the USS Cowpens had to maneuver to avoid a collision on Dec. 5.

The Chinese defense ministry later confirmed the incident but gave few details. It said a Chinese naval ship conducting normal patrols had encountered a U.S. military vessel and handled the situation according to operating procedures.

The Liaoning was bought from Ukraine more than a decade ago and extensively refurbished before entering service last year.