S&P Global Ratings unexpectedly raised its outlook on Poland's sovereign credit rating to stable from negative on Friday, saying it was no longer worried that the government would try to undermine the independence of the central bank.
The agency lowered its forecasts for Poland's economy, but said weaker growth would not harm public finances.
"The outlook revision reflects the reduction in our near-term concerns over a further weakening of key institutions, most importantly Poland's central bank," S&P said in a statement.
In January, S&P cut Poland's sovereign rating to BBB+ with a negative outlook, saying the Law and Justice (PiS) government had weakened key institutions, particularly the constitutional tribunal, with the central bank as the next potential target.
Economists had mostly expected that S&P would leave both the rating and the outlook unchanged on Friday, given that Poland's economic growth has slowed and the PiS-controlled lower house of parliament has approved a costly cut in the retirement age.
Fellow ratings agency Moody's currently rates Poland two notches higher, at A2 with a negative outlook. Fitch is just one notch higher, at A- with a stable outlook.
Since winning last year's election, the eurosceptic PiS has passed laws that made it more difficult for the constitutional court to issue rulings.
S&P said there had been little progress in resolving the conflict between the government and the constitutional tribunal, but that it no longer considered central bank independence to be at risk.