By Ben Blanchard

BEIJING (Reuters) - Philippine President Rodrigo Duterte announced his "separation" from the United States on Thursday, declaring he had realigned with China as the two agreed to resolve their South China Sea dispute through talks.

Duterte made his comments in Beijing, where he is visiting with at least 200 business people to pave the way for what he calls a new commercial alliance as relations with longtime ally Washington deteriorate.

"In this venue, your honors, in this venue, I announce my separation from the United States," Duterte told Chinese and Philippine business people, to applause, at a forum in the Great Hall of the People attended by Chinese Vice Premier Zhang Gaoli.

"Both in military, not maybe social, but economics also. America has lost."

Duterte's efforts to engage China, months after a tribunal in the Hague ruled that Beijing did not have historic rights to the South China Sea in a case brought by the previous administration in Manila, marks a reversal in foreign policy since the 71-year-old former mayor took office on June 30.

His trade secretary, Ramon Lopez, said $13.5 billion in deals would be signed during the China trip.

"I've realigned myself in your ideological flow and maybe I will also go to Russia to talk to (President Vladimir) Putin and tell him that there are three of us against the world - China, Philippines and Russia. It's the only way," Duterte told his Beijing audience.

Duterte's remarks will prompt fresh concern in the United States, where the Obama administration has seen Manila as an important ally in its "rebalance" of resources to Asia in the face of a rising China.

The administration agreed a deal with Duterte's predecessor granting U.S. forces rotational access to bases in the Philippines and further doubts will be raised about the future of this arrangement.

In Washington, the U.S. State Department said it was "baffled" by Duterte's comments and would seek an explanation when Daniel Russel, the top U.S. diplomat for East Asian and Pacific Affairs, visits Manila this weekend.

Story continues

"We are going to be seeking an explanation of exactly what the president meant when he talked about separation from the U.S.," said State Department spokesman John Kirby. "It's not clear to us exactly what that means in all its ramifications."

Both the State Department and the White House portrayed Duterte's comments as being at odds with the close, long-standing alliance between the two countries. They said Washington would welcome closer ties between Beijing and Manila, however.

"The U.S.-Philippine alliance is built on a 70-year history, rich people to people ties and a long list of shared security concerns," White House spokesman Eric Schultz told reporters, noting that the administration has not received any request from Filipino officials to alter bilateral cooperation.

A few hours after Duterte's speech, his top economic policymakers released a statement saying that, while Asian economic integration was "long overdue", that did not mean the Philippines was turning its back on the West.

"We will maintain relations with the West but we desire stronger integration with our neighbors," said Finance Secretary Carlos Dominguez and Economic Planning Secretary Ernesto Pernia in a joint statement. "We share the culture and a better understanding with our region."

RED CARPET WELCOME

China has pulled out all the stops to welcome Duterte, including a marching band complete with baton-twirling band master at his official greeting ceremony outside the Great Hall of the People, which is not extended to most leaders.

President Xi Jinping, meeting Duterte earlier in the day, called the visit a "milestone" in ties.

Xi told Duterte that China and the Philippines were brothers and they could "appropriately handle disputes", though he did not mention the South China Sea in remarks made in front of reporters.

"I hope we can follow the wishes of the people and use this visit as an opportunity to push China-Philippines relations back on a friendly footing and fully improve things," Xi said.

Following their meeting, during which Duterte said relations with China had entered a new "springtime", Chinese Vice Foreign Minister Liu Zhenmin said the South China Sea issue was not the sum total of relations.

"The two sides agreed that they will do what they agreed five years ago, that is to pursue bilateral dialogue and consultation in seeking a proper settlement of the South China Sea issue," Liu said.

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

In 2012, China seized the disputed Scarborough Shoal and denied Philippine fishermen access to its fishing grounds.

Liu said the shoal was not mentioned and he did not answer a question about whether Philippine fishermen would be allowed there. He said both countries had agreed on coastguard and fisheries cooperation, but did not give details.

SEA DISPUTE TAKES 'BACK SEAT'

Duterte's tone towards Beijing is in stark contrast to the language he has used against the United States, after being infuriated by U.S. criticism of his bloody war on drugs.

He has called U.S. President Barack Obama a "son of a bitch" and told him to "go to hell", while alluding to severing ties with the old colonial power.

On Wednesday, to the cheers of hundreds of Filipinos in Beijing, Duterte said Philippine foreign policy was veering towards China.

"I will not go to America anymore. We will just be insulted there," Duterte said. "So time to say goodbye my friend."

The same day, about 1,000 anti-U.S. protesters gathered outside the U.S. Embassy in Manila calling for the removal of U.S. troops from the southern island of Mindanao.

Duterte's abrupt pivot from Washington to Beijing is unlikely to be universally popular at home, however. On Tuesday an opinion poll showed Filipinos still trust the United States far more than China.

Duterte on Wednesday said the South China Sea arbitration case would "take the back seat" during talks, and that he would wait for the Chinese to bring up the issue rather than doing so himself.

Xi said issues that could not be immediately be resolved should be set aside, according to the Chinese foreign ministry.

China has welcomed the Philippines approaches, even as Duterte has vowed not to surrender any sovereignty to Beijing, which views the South China Sea Hague ruling as null and void.

China has also expressed support for his drug war, which has raised concern in Western capitals about extrajudicial killing.

(Additional reporting by Roberta Rampton, Arshad Mohammed and David Brunnstrom in Washington; Writing by Michael Martina and Ryan Woo; Editing by Nick Macfie, Alex Richardson and Grant McCool)