Hungary's junk credit rating has been upgraded by Standard & Poor's, which cited the country's improving growth outlook and its better preparedness to handle unexpected crises.

S&P said in a statement Friday that it was raising Hungary's rating from BB to BB+, one step below investment grade, bringing its assessment in line with the other two major ratings agencies, Moody's and Fitch.

S&P raised its forecast for real economic growth in Hungary to an average of 2.5 percent a year in 2015-2017 from earlier expectations of 2 percent a year. It also said a recent decision forcing banks to convert mortgages in foreign currencies, mainly the Swiss franc, to Hungarian forints reduced Hungary's vulnerability to potential external shocks.

Hungary lost its investment grade credit rating in 2011.