As Asia's last major economy without a full-investment grade, the higher rating boosts the appeal of the nation's assets.
Indonesian officials told S&P officials who visited Jakarta earlier this year that the credit rating agency was already late making an upgrade.
"More upgrades are possible, with Fitch and Moody's potentially moving Indonesia up the scale further into investment grade", Wellian Wiranto, an economist at Oversea-Chinese Banking Corp.in Singapore, wrote in a note.
S&P also said the government's "new focus on realistic budgeting" limits the risk of a widening budget deficit.
The main stock index in Jakarta .JKSE spiked to be up more than 3 percent after the S&P upgrade, the biggest intraday percentage rise since October 2015, and gained 2.6 percent for the day. The rupiah also rallied against the dollar. The upgrade reflects "our assessment of reduced risks to Indonesia's fiscal metrics", it said.
Indonesia is trying to lure investors for a $450 billion infrastructure drive to revive economic growth.
S&P Global gave Indonesian President Joko Widodo a long-awaited reward Friday, lifting the country's long-term sovereign debt rating to investment grade.
Bharat Joshi, investment director at Aberdeen Asset Management in Jakarta, said the upgrade should cut Indonesia's cost of funds, which is relatively expensive compared with regional peers.
After that, Widodo reshuffled his cabinet and appointed the respected former managing director of the World Bank, Sri Mulyani Indrawati, as his finance minister.
She then ran a tax amnesty programme that many said was the world's most successful and is now overseeing a plan to overhaul the taxation system. The 5-year CDS IDGV5YUSAC=MG was down 6 basis points at 125/130 bps. The central bank will seek to maintain stability "to support the continuation of structural reforms taken by the government and the development of a sustainable and inclusive economic growth", Governor Agus Martowardojo said in a statement.
Indonesia's current account deficit shrank to one per cent in the first quarter, Mr Warjiyo said, significantly smaller than the deficit in 2013, which was more than 4 per cent, which had led to heavy capital outflows and a more than 20 percent drop in the rupiah currency. Goldman Sachs Group Inc. said in March an upgrade may help attract as much as $5 billion in funds.