Defense Secretary Chuck Hagel and Australian Defense Minister David Johnston during a joint news conference in Sydney, Australia. (AFP PHOTO/LAUREN LARKING/COMMONWEALTH OF AUSTRALIA, DEPARTMENT OF DEFENCE)

Top U.S. and Australian officials announced Tuesday that they have signed a 25-year deal that will keep thousands of U.S. Marines and airmen rotating through Australia’s Northern Territory for years to come.

The deal gives the United States a growing hub from which its troops can train and launch operations as necessary. But perhaps more importantly, it deepens the relationship between the two countries at a time when there are multiple causes of instability in the Pacific, including territorial disputes in the East and South China seas, erratic leadership in a nuclear-armed North Korea and expanding militaries in both Japan and China.

A long-term agreement has been expected ever since Australia and the United States agreed in 2012 to have about 250 U.S. Marines deploy on a six-month rotational basis to Darwin. The rotation has since grown and now includes about 1,200 Marines at a time; the new agreement will push it up to about 2,500 Marines on a rotational basis in coming years.

Australian Defense Minister David Johnston said Tuesday that discussions between the two nations have been very constructive. Australia has benefited from having more U.S. deployments, he said, and from stability in the region that “has been delivered by U.S. leadership.”

“The booming middle class of Southeast and East Asia has been the end dividend of that stability,” Johnston said, according to transcripts. “And so today, we’ve enjoyed discussing the challenges that we perceive coming over the horizon in the future, matters such as counterterrorism, foreign fighters, which we both, as two countries, have to deal with.”

Johnston added that Australia will contribute personnel to deliver humanitarian aid in northern Iraq. It’s a skill the country has possessed “since East Timor,” he said, a reference to its role in a United Nations mission in 1999 to squash rioting in the Pacific island nation after its people voted for independence from Indonesia.

“We’ll fit into and be part of the planning of the United States and other partners who want to assist on that humanitarian basis,” Johnston said of the new Australia role in Iraq. “And that’s the way we’ll go forward.”

Secretary of State John F. Kerry said Tuesday that the United States and Australia also are committed to curbing the flow of foreign fighters into Iraq and Syria. In one example, he condemned photographs that depict a 7-year-old boy holding a severed head in Australia. The boy’s father, Khaled Sharrouf, is said to be an Australian national who was radicalized and went to Syria to fight.

Kerry said it was “one of the most disturbing, stomach-turning grotesque photographs ever displayed.”

“That child should be school,” he said. “That child should be out learning about a future. That child should be playing with other kids, not holding a severed head and out in the field of combat.”