By James Glynn and Rob Taylor

CANBERRA, Australia--Australia's government forecast wider budget deficits and slower growth over the coming years, putting the country's top sovereign credit rating at risk for the first time in three decades.

The resource-rich economy has been suffering from a slowdown in China, weak commodity prices and falling mining investment at the end of a long commodities boom. A planned shift in investment focus to non-mining industries--such as services--appears to have stalled. Tax revenues have fallen, forcing the government to seek savings.

The ruling center-right coalition on Monday forecast a deterioration in the budget of 10.3 billion Australian dollars (US$7.5 billion) over the next four years. The deficit in the year starting July 1, 2017 is now forecast at A$28.7 billion, up from A$26.1 billion in May. Treasurer Scott Morrison also lowered growth forecasts for the current fiscal year to 2.0% from 2.5%.

Still, the government said it remains on track to restore the budget to surplus by fiscal 2020-2021.

Global credit ratings firms warned ahead of Monday's midyear budget update that the country risked a downgrade of its prized triple-A sovereign debt rating--to AA+--if it didn't show a clear path back to surplus. Australia hasn't been downgraded since 1986.

Australia is one of only a handful of AAA-rated sovereigns remaining world-wide. A downgrade would raise borrowing costs for federal and state governments and the nation's commercial banks--which get much of their capital from overseas. It would also add pressure on Australian households, which are among the most indebted in the world.

Standard & Poor's Global Ratings put Australia on credit watch after cliffhanger elections in July that left Prime Minister Malcolm Turnbull's conservatives with a narrow majority, making it difficult to pass budget reforms. Fitch Ratings said after the budget update that forecast assumptions were consistent with its triple-A rating. Moody's Investors Service said it was looking at the document, while S&P couldn't immediately be reached.

Mr. Morrison has pledged cuts to generous welfare and social programs over the next four years. But savings measures worth A$14 billion remain blocked in the Senate, where the government needs support from fringe lawmakers to pass legislation.

Some analysts said it was likely only a matter of time before Australia loses its triple-A rating.

"While today's fiscal update still projects a return to surplus in 2020/21 ... the ongoing deterioration in the starting point for consolidation will mean that the hurdleto keep the AAA credit rating is higher," J.P. Morgan analysts said Monday. "This is an unenviable proposition given the current composition of the Parliament, and might just be enough to convince S&P that the AAA credit rating is no longer sustainable."

Mr. Turnbull, a wealthy former Goldman Sachs banker, promised voters economic improvement after ousting Tony Abbott as conservative prime minister last year. Instead, Australia's economy contracted for the first time since early 2011 in the third quarter, threatening the longest ongoing recession-free streak in the developed world. Unemployment has crept up to 5.7%.

Since he became leader, the global economic outlook has become more complicated, with the shock of Britain's decision to leave the European Union and a likely more-protectionist U.S. administration in 2017 both posing risks to Australia's trade-reliant economy. U.S. President-elect Donald Trump has threatened a trade warwith China, Australia's biggest export customer.

The government on Monday said it expected net debt would peak at 19% of GDP in fiscal 2018-2019, a year later than previously expected.

Unemployment is expected to hover at 5.5% at the end of the fiscal year, unchanged from a May forecast of 5.5%. Treasury officials now expect growth to reach 2.75% in fiscal 2017-18 and 3% the year after that.

The budget update forecast iron-ore prices would decline from recent averages of around US$68 a metric ton to around US$55 a metric ton by September 2017--much lower than boom-era highs of about US$190.

Write to James Glynn at james.glynn@wsj.com and Rob Taylor at rob.taylor@wsj.com

(END) Dow Jones Newswires

December 18, 2016 22:32 ET (03:32 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.