(Adds comment by Moody's analyst, statement by governor's office, details on bond authorization)
CHICAGO, July 20 (Reuters) - Illinois avoided becoming the first U.S. state with a junk credit rating on Thursday after Moody's Investors Service kept the fiscally challenged state at the lowest investment grade level.
That followed recent actions by S&P, which left Illinois a step above junk at BBB-minus, and Fitch Ratings, which kept its rating at BBB, two steps above junk.
An unprecedented two-year budget impasse led to deterioration in the state's already-shaky finances.
Moody's said it confirmed Illinois' Baa3 rating with a negative outlook based on the passage of a fiscal 2018 budget "that alleviates immediate liquidity pressures, moves the state closer to fiscal balance and should keep pension and other fixed costs at manageable levels at least in the near term."
"The state did enough to prevent further deterioration at least for now," said Moody's analyst Ted Hampton.
The Democratic-controlled legislature enacted a $36 billion budget and $5 billion income tax increase on July 6 by overriding the vetoes of Republican Governor Bruce Rauner, giving Illinois its first complete spending plan in two years.
Rauner's office said Illinois still has work to do.
"Illinois families and businesses deserve better than the lowest credit rating in the nation," the office said in a statement, referring to the fact Illinois remains the lowest-rated U.S. state.
Moody's, which had placed Illinois on review for a potential downgrade on July 5, said the state continues to face long-term challenges that include a huge unfunded pension liability and an unpaid bill backlog that ballooned to more than $14 billion during the budget impasse.
The credit rating agency added that the rating's negative outlook takes into account implementation risks for the budget, including the potential failure to realize spending cuts and revenue increases, and the state's vulnerability to an economic downturn.
Factors that could still lead to a downgrade to junk for Illinois include an increase in its bill backlog, a reduction in pension contributions, and "political paralysis that results in failure to provide for timely payment of subject-to-appropriation debt," Moody's said.
The budget for the fiscal year that began on July 1 authorized the issuance of up to $6 billion of bonds along with other measures to pay off overdue bills that are generating late payment penalties of as much as 12 percent.
Moody's said the state "has made no final decision on whether to use this authorization."
(Reporting by Karen Pierog; Editing by Tom Brown and Matthew Lewis)