MANILA (Reuters) - China's coastguard rescued two Filipino fishermen from a capsized boat near a disputed South China Sea shoal on Friday, underlining the fast thawing of ties between two countries long at odds over sovereignty.

A Philippine coastguard vessel navigated choppy waters to collect the two fishermen from the Chinese ship, in what would be the first time in four years both countries' coastguards were in close proximity in the Scarborough Shoal, a rocky outcrop at the heart of years of diplomatic tension.

"As we speak, the Chinese vessel is linking up with our own ship to turn over the two Filipino fishermen," said Philippine coastguard spokesman Commander Armand Balilo.

"It is taking some time because the waters in the area are very rough."

In Beijing, Chinese Foreign Ministry spokesman Geng Shuang said the fishermen were in good health and that efforts were continuing to get them on to the Philippine ship.

China "will continue to patrol and keep watch in waters around Huangyan Island and faithfully carry out its responsibilities and mission to safeguard the peace, tranquility and order in relevant waters", he said, using the Chinese name for Scarborough Shoal.

The rescue illustrates the rapid changes in the relationship between the two countries under Philippine President Rodrigo Duterte, who in only a few months has sought to turn a historic foe into a friend. He visited Beijing in October and has met twice with Chinese leader Xi Jinping, to whom he has expressed admiration.

The last time coastguards of the two countries were both at the shoal was in June 2012, during a protracted face-off sparked by Philippine attempts to arrest Chinese fishermen.

That led to the Philippines lodging a case with the Permanent Court of Arbitration in The Hague, which infuriated China and put its claims to most of the South China Sea in the international spotlight.

The Philippines won that case in July, with the arbitral award voiding China's U-shaped line of sovereignty on its maps.

The ruling made clear the Scarborough Shoal was under the jurisdiction of no country and claimants China, the Philippines and Vietnam were entitled to exploit its plentiful fish stocks.

China was until recently overseeing a blockade of the shoal some 124 miles off the Philippines coast, chasing away Filipino fishermen and sometimes blasting them with water cannon.

Duterte has told Xi he will unilaterally turn the shoal into a marine sanctuary, banning fishing within the lagoon and restricting it to the peripherals. It is unclear whether Xi will agree to that and how it would be enforced.

(Reporting by Manuel Mogato; Additional reporting by Michael Martina in Beijing; Editing by Martin Petty)