In February last year, Indonesia researcher Marcus Mietzner predicted that Joko 'Jokowi' Widodo would not only run for president in this year's election but that he would win. A year later, Mietzner's bold prediction seemed to most observers like a foregone conclusion. The question was no longer whether Jokowi would succeed in running for president, but when his party chairwoman Megawati Sukarnoputri would permit him to do so.

Megawati did endorse Jokowi as her party's presidential candidate, putting aside her own aspirations and those of her daughter, Puan Maharani. Then came the legislative elections last month and the poorer than expected result for Jokowi's party, the Indonesian Democratic Party of Struggle (PDI-P). By quick-count results (official results are due to be announced in the coming days), the PDI-P secured about 19% of the vote, less than the 25% needed to independently nominate Jokowi for president. Suddenly, doubts began to arise about whether Jokowi could simply sail into the presidency, as many had come to believe.

In a thorough rundown of events on Inside Indonesia this week, Mietzner defends PDI-P's legislative result, arguing that it only looks disappointing because of unrealistic expectations raised by experimental* polls and local media. However, he concludes by saying that 'losing is no longer an impossibility' for Jokowi in the presidential race.

The first challenge for Jokowi is to form alliances with other parties to support his presidential bid. The National Democratic Party (Nasdem), which took 7% of the quick-count vote, has already jumped on board to give PDI-P the percentage of the vote it needs to nominate Jokowi as a candidate. Aside from votes, Nasdem also brings to the table its chairman, media mogul Surya Paloh, who has pledged to wage 'land, sea and aerial attacks' to win public support for the bid.

At the time of writing, Jokowi was also reportedly on the verge of securing support from two Islamic parties, the National Awakening Party (PKB) and the United Development Party (PPP), which did better than expected in the legislative round, gaining about 9% and 6% of the quick count vote, respectively.

PKB brings with it the financial support of Lion Air founder Rusdi Kirana. However, it may yet lose the star power brought by 1970s pop sensation Rhoma Irama, whose fans are having trouble accepting the fact that, under a coalition with PDI-P, he may no longer be a candidate for president. In West Java on Monday, his fans reportedly burned party flags and threatened to withdraw their support for PKB if the singer lost his presidential nomination to Jokowi.

Meanwhile, PPP initially came out in support of Greater Indonesia Movement (Gerindra) chairman Prabowo Subianto for president, but the statement was later retracted due to disagreement from the party's central executive board. The party is now reported to be seeking an alliance with PDI-P.

As it turns out, Gerindra may not be too disappointed with the retraction, as it appears to be on the verge of announcing a coalition with a much bigger party: Golkar. In the legislative round, Golkar came in second with about 15% of the quick-count vote, while Gerindra was third with about 12%. A pairing of the two popular parties would be a huge challenge for Jokowi and the PDI-P in the upcoming campaign.

The PDI-P took a respectable lead in the legislative elections, even if it didn't make the cut-off for a stand-alone presidential bid. However, to meet longstanding predictions that Jokowi can make it to the presidency will require more tactical manoeuvering and a solid campaign from the PDI-P. At this stage it seems that the presidency is still well within Jokowi's reach, but he will have to stand up to take it.

* This word added for clarification at 11.34am on 2 May.