No walk in the park: Jokowi with former Indonesian president Megawati Sukarnoputri in 2012. His support has recently dipped, although he remains the favourite to win the presidency. Credit:Reuters Joko Widodo was born on June 21, 1961, and grew up in Solo, also known as Surakarta, a busy regional city at the heart of Javanese culture. "His parents couldn't afford to buy a house of their own, so the family kept moving from one rented house to another, all built illegally on government land," says Jokowi's biographer Yon Thayrun. A former neighbour of Jokowi, Suharno, still lives by the river. He remembers young Joko fondly, telling of a serious child who was traumatised in the 1970s when their squat was cleared by the government to make way for a truck depot. Joko consoled himself with reading and heavy metal music – he still lists Metallica, Megadeth, Lamb of God and Napalm Death among his favourites. On his reading list were his father's books about Indonesia's first president, Sukarno. It is "quite normal", says Thayrun, for even poor villagers to own books by or about Sukarno, the speechmaker who inspired his country to break free of the Dutch after World War II, then led it for 20 years. "These books are mostly about [Sukarno's economic doctrine] Marhaenism ... Ordinary people read them and believe in Sukarno's teachings, and Jokowi's father was one of them." Marhaen was an idealised poor farmer, and the economic policy named after him differs from Marxism because he was not a member of the employed proletariat. Indonesia's poor were, and remain, microbusiness owners working in the informal sector (without minimum wages, conditions or the need to pay tax).

Like Joko's father, they may own some income-producing goods such as a fishing net, a rubbish cart or a street stall, but still struggle to feed their families. Sixty-eight per cent of employment in Indonesia remains in the informal sector. As a boy, Jokowi was determined to escape this fate using the most reliable method he knew – education. Come time for senior high school, he was desperate to get to SMA 1, the best school in Solo. But he found then, as now, it was the cheats who prospered. "I passed junior high with good marks ... but there were some people who cheated [and they got in before me]," he said recently. He was relegated to SMA 6, a technical school he felt was second best. "For almost six months I was so sad I locked myself in my room. I had no desire to go to school." "He got sick because of that," says his mother, Sujiatmi. "He got fever and typhus." By 1980, Jokowi had overcome his disappointment and graduated dux, winning a place in the Forestry faculty at the respected Gadjah Mada University in neighbouring Yogyakarta. In 1985, he was awarded his forestry degree; the same year he married his sweetheart, Iriana, a friend of his sister's, and went off to his first job in a pulp mill in the rugged highlands of Aceh's Takengon in Indonesia's far west. After four years, he returned to Solo with the pregnant Iriana to work for his uncle, who owned a furniture factory.

In 1988, the young man struck out on his own, setting up his own manufacturing operation, making furniture of wood and cane. David Wijaya, another Solo furniture maker, recalls Jokowi as "a simple man, easy going, easily approached, and yet he was very active and hard-working". He was also hands-on, driving timber around in his own car and moving among his workers dressed in jeans and a white shirt. Jokowi would also make unannounced visits – known by a Javanese word, blusukan – to his factories to check if his employees were slacking off or cheating, Wijaya says. The business thrived and he became an exporter, opening showrooms in Europe, the US and Asia. In 2002, he was elected chairman of the local Furniture Manufacturers' Association. In 2005, a group of Solo business leaders resolved to run a candidate in the mayoral election to combat the tangled bureaucracy and petty corruption that blights business regulation in Indonesia. They ran a "fit and proper" test to assess potential candidates' suitability, because, according to Wijaya, they were not interested in politics as usual – that is, "someone who only wanted to enrich himself and his cronies and families". Joko Widodo was their choice. Wijaya says one of Jokowi's aims was to "increase investment by simplifying government procedures". Jokowi won 36 per cent of the popular vote – not a majority, but the largest single bloc, and enough to become mayor. It was a humble start to a meteoric political rise. In office, he behaved as he had as a factory owner, using blusukan to police the bureaucracy. The poor took note of the mayor who still wore his trademark white shirt, refused to update the mayoral car and donated his salary back to the city. When asked about Jokowi's political accomplishments, everybody begins with one – negotiating the move of hundreds of street traders from Banjarsari Park in central Solo to a built, undercover market.

He was not the first mayor to try this. The park was one of Solo's few open spaces but it was blighted by a chaotic informal market. Previous attempts had resulted in protests, threats of bloodshed, then failure. "When Jokowi first came, we were sceptical because the earlier government had asked for money and we thought this one would, too," says Dedi Surianto, the owner of a market stall in the modif – motorcycle modification – section. Dedi says traders had paid 5 million rupiah each (about $500) to the former mayor's team to build a new market but the cash had disappeared. In the context of Indonesian governance, it's a credible tale. Jokowi, whose Marhaenist philosophy could have been tailor-made to deal with people like Dedi, asked for nothing. Instead, he talked the issue out and offered cheap establishment loans with no time limit on repayment. After 75 discussions, the stallholders agreed to move. One morning in July 2006, they said a Javanese prayer, carved a ceremonial cone of yellow rice, and marched together – the mayor at the head of the procession – to their new place of work. Customers came and businesses flourished. Every so often, Jokowi would perform a blusukan "at 6am, still wearing shorts, to check the kiosks", Dedi says. "He'd also check on the market office, and if the administrators were not here, he'd ring them up." Eight years later, the Solo traders remain evangelical in their praise. "He is close to the people," says Ferry Sutiarman, another modif merchant. "If you ask Jokowi the names of the traders here, he can tell you ... his approach is that he goes to the people, he asks what the problems are, and he solves those problems."

When the 2010 mayoral election came, Jokowi announced he would not campaign, but simply keep working. He won a second term with 90 per cent of the vote. At the time he was a relatively inactive member of the Indonesian Democratic Party of Struggle, PDI-P, which is run by Megawati Sukarnoputri, the daughter of Sukarno. But the small town mayor's popularity caught her eye and in 2012, she, along with then political ally Prabowo, approached Jokowi to run as governor of Jakarta. It was a big offer. Solo has a population of 500,000 to Jakarta's 10 million, plus millions more who commute in. It's one of three semi-autonomous regions in Indonesia and by far the richest, but it's plagued by traffic congestion, flooding, poverty, subsidence, poor planning, corruption, inequality, gangsterism and squatters. Jokowi accepted, agreeing to take on the incumbent, Fauzi Bowo. When he left Solo, the traders each gave him a souvenir. "I made a chair like this and gave it to him," says Dedi, pointing to a three-legged steel stool welded from engine parts. They also raised campaign money for him – the first time ever, according to Dedi, that ordinary people had done this. The Jakarta campaign was smart, fresh and aimed at Indonesia's teeming, social media-adapted young. A viral musical video depicted the all-day ordeal that a young man undergoes to try to renew his ID card. In September 2012, Jokowi won a come-from-behind victory against Bowo and leapt to national prominence. With the eyes of the nation on him, one of his first acts was to turn up at 8am – the opening time – to a city district office in the suburb of Guntur where ID cards are processed. No official was in sight, so he sat down and waited, answering journalists' questions about indolent officials. Blusukan culture had arrived in Jakarta and the city lapped it up.

The social-media election campaign translated into a cult-like online following in a place where more people use Twitter and Facebook than almost anywhere else on the planet. Supporters howled down detractors as the new governor and his tough-talking deputy, Basuki Tjahaja Purnama, introduced a free healthcare card and education funds for the poor, began building a much-delayed public transport system and shifted 14,000 squatters out of flood catchments and into low-cost apartments. Jokowi spent more time out of the office inspecting public works, handing out notebooks to children and taking indolent officials to task than he spent in it. He also sacked top city officials. "I will remind them, replace them ... remind them again. I will fire them; I will remind the others again and I'll fire them too if necessary," he said. "Check again, check again, check again. It's the only way." Deputy Basuki – virtually unique in Indonesian politics as a descendent of Chinese immigrants and a Christian – posted YouTube videos of himself dressing down public servants in budget meetings. He is often portrayed as the "bad cop" in the relationship, but he tells Good Weekend that Jokowi encouraged these outbursts and was "even stronger than me" in meetings. Indonesia is a sprawling country but 80 per cent of its media is based in Jakarta, and the new governor's fame spread fast. In the remote village of Batukatak in North Sumatra, more than 1000 kilometres from the capital, local elder Ngalemi Sinuraya told this reporter in mid-2013: "Jokowi is for the orang kecil [the unimportant people] ... he is like us." Speculation about a presidential run began almost immediately. On the national stage, Susilo Bambang Yudhoyono's ability to make a decision had ended well before his presidential term as, in the words of ANU academic Marcus Mietzner, he "withdrew into the joys of ceremony and increasingly pompous speeches".

Before Jokowi, the field of potential replacements was a mix of failed former candidates and Suharto-era relics – thrice-beaten Megawati, disliked businessman Aburizal Bakrie and Prabowo, an ex-general with a poor human-rights reputation. In this company, Jokowi seemed inspired, but for 19 months he refused be drawn. Jakarta, meanwhile, was proving tougher than Solo. The 2014 floods were as bad as any year, the healthcard had teething problems and Jokowi's attempt to replicate his success with street traders largely failed. More than 500 smallholders at the Tanah Abang market he'd encouraged to move off the streets and into a three-level market building had, less than a year later, gone back, complaining that customers would not climb the three storeys to their stalls. Local gangsters were also offering inducements for stallholders to return to the streets. On the day Good Weekend visited, city security officials were doing nothing about the flourishing illegal street trade, to the chagrin of the legal businesspeople watching from above. "They should enforce the law but look at them. What's the conspiracy?" asks Joni, a stallholder who hasn't had a customer for weeks. "We don't sell Jokowi T-shirts. We're against that," states clothing stallholder Yasnita. "If Jokowi can't even manage Tanah Abang, how can he manage the country?" adds Joni.

As the campaign for president increases in intensity, these negatives are being amplified nationally: Jokowi is abandoning Jakarta after only 18 months, the job is not half done; he's just the velvet glove on the real iron fist, [deputy] Basuki; he's too inexperienced; running a country is too big a job for blusukan and micromanagement. In a country desperate for infrastructure projects to be delivered without corruption, an instinct for hands-on problem-solving would be welcome but, as Yon Thayrun points out, "He can't check everything: Jokowi only has two hands and 10 fingers." A "black campaign" of libels, including a fake obituary using Jokowi's supposed "real" Chinese name, Oey Hong Liong, is circulating online, but most damaging is the suggestion that Jokowi is merely a puppet controlled by PDI-P chairwoman Megawati. She is deeply unpopular outside her fan club, but still calls the shots in her party. "I don't mind being called a puppet," Jokowi declared in April."But I'm the puppet of the people." The impression, though, is strong and regularly reinforced by the Sukarno family itself, which is struggling to cede power. Jokowi had to endure a long and humiliating wait before Megawati decided in March to forego another presidential run and choose him. Her even less popular daughter, Puan Maharani – who is running the PDI-P campaign – makes little pretence of liking the newcomer. "People had hoped that power could be retaken by the descendants of Sukarno," Puan said in a recent interview with Tempo magazine, adding: "Anyone who betrays [Sukarno's] convictions ... does not need to be strangled or beaten up. He just disappears, believe it or not." A disappointing performance by PDI-P in the parliamentary elections in April further fuelled the negatives. The party expected that the so-called "Jokowi effect" would win at least 27 per cent of the vote – it came away with just 18.95 per cent, still the winner in the 12-party race, but well below expectations. Suddenly Jokowi, the giant killer in Jakarta, the man who did not even need to campaign in Solo, looked vulnerable. Indonesia's sharemarket and currency both fell.

ANZ Bank Asia-Pacific economist Daniel Wilson says business likes Jokowi's promise of fresh, activist government and "wants to see a more decisive result so the way forward is clearer". In the weeks following the parliamentary poll, PDI-P made it worse, seemingly mired in indecision over coalition negotiations and the choice of a running mate. The latter was eventually resolved (at some risk to Jokowi's cleanskin image) by appointing Megawati's favourite political war-horse, former vice-president Jusuf Kalla. Meanwhile, as rival Prabowo energetically spelled out a populist platform and projected toughness and decisiveness, Jokowi's Javanese habit of speaking little, and then only in hints and riddles, failed to establish a presidential program or persona. The result was a dip in the polls from 52 per cent to 47 per cent going into May. Prabowo's numbers rose almost 10 per cent, from 23 per cent to 32 per cent. PDI-P has reliably snatched defeat from the jaws of victory in the post-Suharto era, and the parliamentary result raises serious questions about the party's ability to run a campaign. Still, Jokowi remains the favourite. "Markets at the moment are pricing in a Jokowi victory," says Fauzi Ichsan, the managing director of Standard Chartered Bank, in May. "If he's not elected president, then the markets will be shocked." If he wins, though, it's Indonesia's old elites who'll brace for a shock, because then, the quintessential outsider – a skinny boy who grew up on a riverbank in Solo – will have control over the reins of power. And nobody really knows what he'll do with them.