STANFORD, Calif. (Reuters) - U.S. Secretary of State Mike Pompeo said on Tuesday after meetings with his Australian counterpart he was confident South Pacific nations would choose the United States as an ally over China, despite Beijing’s growing clout in the region.

U.S. Secretary of State Mike Pompeo participates in a cabinet meeting at the White House in Washington, U.S., July 18, 2018. REUTERS/Leah Millis

“I think the South Pacific, like most places in the world, understands the enormity of having an American ally -- a country that consistently over decades projects the democratic values,” Pompeo told a news conference after meetings with Australian Foreign Minister Julie Bishop.

“The human dignity that comes with having an American partner is different from having partners that aren’t quite that way. I think over time that will ultimately prevail, not only in the South Pacific, but all across the world,” he added.

U.S. Defense Secretary James Mattis, who held talks with his Australian counterpart Marise Payne in California, said both the United States and Australia agreed on the need for a free and open Pacific region “where nations large and small are treated with respect for their territorial integrity, for their sovereignty, their sovereign decisions.”

In a joint statement, the countries said they were committed to working together to “shape an Indo-Pacific that is open, inclusive, prosperous, and rules based.”

Mattis and Payne signed a memorandum of understanding to work together to develop software to address cyber and other security threats.

The agreement comes amid efforts by Australia to ramp up diplomacy in the Pacific to combat China’s rising influence. In June, Australia promised to bolster the cyber security capability of Pacific island nation Vanuatu as part of a negotiation on a security treaty with its neighbor.

In April, Australia expressed “great concern” at reports, later denied by both sides, that Vanuatu and China were in talks to establish a Chinese military presence in the archipelago.

After the two days of talks at Stanford University, the United States and Australia reiterated calls for a code of conduct for the South China Sea.

Washington and Beijing have frequently sparred over who is militarizing the South China Sea, with Beijing blaming tension on actions such as the “freedom of navigation” operations by the U.S. navy. Washington says such operations are necessary to counter China’s efforts to limit nautical movement there.

Addressing the same news conference, Bishop said both countries were committed to their alliance, adding: “We don’t always agree with the United States and the United States doesn’t always agree with us, but we are able to work through any differences in a very constructive and positive way, and we’ll continue to do that.”

Ties between the President Donald Trump and Australian Prime Minister Malcolm Turnbull have improved since an acrimonious phone call last year between the two allies. Turnbull was one of the first foreign leaders Trump spoke to after taking office on Jan. 20.