(Adds detail, background)
July 24 Moody's Investor Service raised Portugal's government bond rating on Friday to "Ba1" from "Ba2", on expectations that the country's fiscal consolidation will remain on track.
Portugal's highest court in May struck down several budget measures, including some public sector salary cuts, creating a fiscal gap of about 700 million euros this year.
"The first driver behind the upgrade is Moody's view of the government's strong commitment to fiscal consolidation, despite repeated set-backs stemming from the adverse rulings of the country's Constitutional Court," Moody's said on Friday. (bit.ly/1phcEXF)
The ratings agency also said it does not expect the issues facing Banco Espirito Santo to have an effect on the government's balance sheet.
Lisbon was forced to seek a bailout from the European Union and the International Monetary Fund in 2011.
Portugal said in June it decided to forego the last payment from its international bailout program after the country's constitutional court rejected a series of austerity measures.
The country's economy started to recover last year, and bond yields have fallen this year.
Portugal has undertaken several austerity and reform measures since the European debt crisis that rocked global markets.
The ratings agency assigned a stable outlook to the government bonds but said that the country's high external debt was a key credit weakness. (Reporting By Narottam Medhora in Bangalore; Editing by Joyjeet Das)