SYDNEY, Australia — Responding to the military challenge from China, the Australian government on Thursday announced a robust increase in military spending, including the biggest expansion to its navy since World War II.

A defense white paper issued by Prime Minister Malcolm Turnbull’s government said 12 new submarines, 12 combat patrol vessels and nine antisubmarine frigates would be added to the current fleet.

Over all, 5,000 more personnel would be recruited for the Australian military and military spending would be increased to 2 percent of the country’s gross domestic product by 2021, in keeping with a pledge that Australia made to the United States as part of its commitment to share defense responsibilities in the Asia-Pacific region.

As America’s closest ally in the region, Australia works with Washington on military operations and intelligence matters, and it has promised the Obama administration that it will invest in a stronger military.