Joko Widodo, 52, has made infrastructure development and streamlining tax collection centrepieces of his governance, boosting his support in the business community.
The Indonesian Democratic Party of Struggle, or PDI-P, the main opposition party, said on Friday that it would support him, ending months of speculation over whether the opinion-poll favourite would stand.
"I received a mandate by the chairwoman of the Indonesian Democratic Party of Struggle, Megawati Soekarnoputri, to be the presidential candidate," Widodo told reporters in brief comments broadcast on Metro TV.
He then kissed the Indonesian flag and walked off without answering questions.
Even before his candidacy was announced, Widodo, nicknamed Jokowi, topped a January poll by the Indonesian Survey Circle, ahead of the Golkar Party's Aburizal Bakrie and Gerindra's Prabowo Subianto.
The world's fourth-most populous country is scheduled to hold parliamentary elections in April and a presidential vote in July.
"He has to be the number-one favourite," said Keith Loveard, head of political risk analysis at the Jakarta-based security company Concord Consulting. "It’s unlikely any candidate could get anywhere near him."
The Jakarta Composite Index rose 3.2% on Friday, the biggest one-day rally in almost six months, in response to the news.
"Investors are flowing into Indonesian equities on the announcement and they are buying liquid stocks with large capitalization like banks," said Alvin Pattisahusiwa, chief investment officer at PT Manulife Aset Manajemen Indonesia.
Puan Maharani, the daughter of Megawati and the head of the party's central executive board, earlier announced Widodo's candidacy in a televised broadcast in Jakarta.
Widodo had said Megawati, a former president, would decide on his candidacy and avoided speaking of national ambitions.
"The biggest challenge for Jokowi is that he’s not his party's chairman," said Airlangga Hartarto, a member of Golkar’s central executive council.
"If he becomes president he will need to go back to Ibu Megawati to get support, it could be tricky. That’s the hard part. He has to have a vice president who can liaise with other parties to get support."
Widodo said in a Jan 21 interview that he planned to boost the capital's budget by about 75% for this year by moving tax collection online to tackle widespread evasion.
He may seek to replicate his tax policy across Indonesia, where the ratio of tax to gross domestic product was 11.8% in 2011, compared with 17.6% for Thailand, according to World Bank data.
"What people are seeing in Jokowi is someone who works, someone who does field visits, hits the ground, tries to remove bureaucratic barriers and reform the government," said Yose Rizal, the founder of politicawave.com, which tracks political discourse on the Internet.
The PDI-P will be seeking a boost for its prospects in the April parliamentary polls with the Jokowi news, according to Paul Rowland, an independent political analyst based in Jakarta.
"There were legislative candidates who had already put photos of Jokowi on their campaign posters," he said. "If we believe the polls you’ve now got a front-running presidential candidate in the race and a front-running political party in the race."