By David Brunnstrom

WASHINGTON (Reuters) - U.S. Secretary of State John Kerry said on Thursday he remained confident about the future of the U.S.-Philippines relationship despite "a difference here or there" and that he hoped to visit Manila again before leaving office.

New Philippine President Rodrigo Duterte has thrown Manila's long-standing alliance with Washington into question since taking office in June with a series of insults and threats to cut ties with the former colonial power.

Speaking at a swearing-in ceremony for the new U.S. ambassador to the Philippines, Sung Kim, Kerry called the alliance between the two peoples "indelible."

Kerry recalled shared resistance to Japan in World War Two and noted that nearly 4 million people of Philippine descent live in the United States while almost a quarter of a million Americans live in the Philippines.

"I am confident about the future of our bilateral relations, notwithstanding a difference here or there about one thing or another," he said.

Kerry did not mention Duterte by name but said all needed to have the wisdom to adjust to change brought about by democratic elections. He noted that Sung Kim had tackled "some really tough, complex challenges" in the past, given his previous assignments dealing with North Korea.

Kerry said the United States and the Philippines would "continue to consult openly and honestly" and added: "I very much hope to visit there before leaving my term of office as secretary of state."

Kerry's term officially ends on Jan. 20 after Tuesday's U.S. presidential election, although he could be asked to stay on temporarily under the future administration.

He said he told Duterte on a visit to the Philippines in July of Washington's "ironclad commitment to the sovereignty and independence and security of the Philippines."

"We will continue to cooperate in efforts to maintain peace and stability and to promote shared prosperity in the Asia Pacific," Kerry said, adding that Washington would continue to help the Philippines in the event of national emergencies.

Daniel Russel, the senior U.S. diplomat for East Asia, who visited the Philippines last month, conceded that the relationship was "going through a bit of a rough patch - some growing pains.

"There been some name-calling coming out of Manila; some questions raised about what the future holds," he told a news briefing. "But ... the deep, deep roots between the United States and the Philippines ... will over the long term ensure stability in the relationship."

Russel, an assistant secretary of state, said all the senior officials he met in Manila told him they saw value in continued defense cooperation and he was not aware of any action that had "significantly affected our ability to cooperate."

"I am not saying that can't happen, but I hope it doesn't," he said.

In his latest outburst, Duterte chided the United States on Wednesday for the halt of a planned sale of 26,000 rifles to his country, calling those behind the decision "fools" and "monkeys" and indicating he might turn to Russia and China instead.

(Reporting by David Brunnstrom; Additional reporting by Lesley Wroughton; Editing by James Dalgleish and Tom Brown)