MANILA (Reuters) - A Malaysian naval patrol detained three Philippine fishermen for encroaching in territorial waters in the disputed Spratlys this month, the Philippine military said on Tuesday, in what may be the first such incident involving Southeast Asian neighbors.

Malaysia and the Philippines have overlapping exclusive economic zones in the disputed South China Sea, which is believed to have rich deposits of oil and gas and is almost entirely claimed by China.

But Brunei, Malaysia, the Philippines, Taiwan and Vietnam also claim the sea, through which about $5 trillion in ship-borne trade passes every year.

On May 9, the Philippine vessel was about 18 miles (29 km) southwest of Commodore Reef, one of nine Philippine-held territories in the South China Sea, when a Malaysian patrol boat intercepted it for encroaching in territorial waters.

When the vessel tried to flee, the patrol boat gave chase, and briefly detained the fishermen. Hours later they were turned over to Philippine troops stationed on Commodore Reef, a Philippine navy spokeswoman said.

“The Western Command is saddened by the incident involving our fellow Filipinos,” Captain Cherryl Tindog said in a statement, adding that the fishermen received medical treatment. “They are in stable condition, except for some bruises.”

The statement gave no reason for the time elapsed since the event.

The fishermen complained of having been punched and kicked during questioning by the Malaysian Navy after being apprehended, Tindog added.

“We were treated like criminals,” Nelson Plamiano, one of the fishermen, told broadcaster GMA 7.

The Malaysian Navy did not immediately respond to a request for comment.

The Philippine military directed questions on diplomacy and policy issues to the Philippine foreign ministry, which did not respond to queries from Reuters.

Political analysts say the incident was the first reported to involve the Malaysian navy and Philippine fishermen since a 2012 escalation of tension in the South China Sea, when China harassed Philippine and Vietnamese fishermen in the Spratlys.

Malaysia’s handling of the Philippine fishermen was a violation of an informal code of conduct signed in Cambodia in 2002, said Jay Batongbacal, an expert in maritime law from the University of the Philippines.

“Our Department of Foreign Affairs should talk to Malaysia about this incident, because hitting our fishermen was not part of any agreement,” he added.