ATHENS, Greece - The Standard & Poor's ratings agency lifted Greece's credit grade out of default on Wednesday after the country completed a major debt writedown with private creditors.

It upgraded the country from selective default to 'CCC', still in junk status, and gave it a stable outlook, which means no further ratings changes are being considered.

Athens finalized its bond swap, the largest in history, on April 25. The deal wiped €100 billion ($132 billion) off Greece's debt and saw private bondholders take a cut of about 75 per cent on the real value of their investment.

An integral part of the conditions for the crisis-hit country to continue receiving international rescue loans, the bond swap aims to trim Greece's debt from about 165 per cent of gross domestic product last year to about 120 per cent by 2020.

The finance ministry said on April 25 about €199 billion ($262.9 billion) worth of bonds have been exchanged, out of the total €205.5 billion in eligible paper owned by banks, pension funds and other private bondholders.

Greece has been relying on billions of euros in international rescue loans since 2010, after years of overspending and mismanagement of the country's finances left it locked out of the international bond market and facing a potentially catastrophic bankruptcy.

In return for two bailouts, Greece has imposed harsh austerity measures that have included repeated rounds of tax hikes, as well as cuts to pensions and salaries. The measures hammered the economy, which is in the fifth year of a recession.

Budget figures announced Wednesday showed Greece's deficit rose to €4.7 billion ($6.2 billion) in the first quarter of 2012, from €2.8 billion ($3.7 billion) a year earlier. But state spending improved when interest payments were not included — with Greece achieving a primary surplus of €2.3 billion in the first three months of the year, compared with €518 million ($680.2 million) last year, according to data from the Finance Ministry's General Accounting Office.

Greece will hold national elections this Sunday, with opinion polls indicating no party will win enough of a majority to form a government without seeking the backing of another party to form a coalition. With the country expected to take more fiscal measures to meet targets in June, the elections are critical.

S&P noted it was keeping Greece in junk status with its 'CCC' rating due in part to its "uncertain economic growth prospects" and weakening political consensus for unpopular reforms.

"The fiscal consolidation under way is largely premised on tax hikes and improved tax collection, an extensive privatization program, and wholesale cuts in government spending," the agency said. "We believe this adjustment has implementation risks given the likely further contraction of the sovereign's GDP this year and next, which will likely result in persistent social pressures."

"The adjustment in our view will be particularly challenging after the upcoming May 6 parliamentary elections," it added.

However, it said its outlook was stable "balancing our view of the government's stated commitment to improving its fiscal track record and effecting a material fiscal adjustment, against the economic and political challenges of doing so."