Muhammad Dihan Awalidan, 4, is part of Indonesia's smoking epidemic. Credit:Michael Bachelard We huddled, our eyes streaming, in what we later learnt was the Indonesian vice-president's compound. The Australian government suggests travellers to Indonesia exercise a "high degree of caution". But I lived there with my family for three years; I spent time in prisons and at protests and sought out conflicts and strains. I was an environment correspondent, an immigration correspondent, a religion reporter, a political reporter. I spent a huge amount of time writing about Schapelle Corby and chronicling the flow of asylum seekers, who were eventually stoppered in Indonesia by Operation Sovereign Borders. I travelled from one end of Indonesia to another (twice, in fact, I did it in a day). I was tear-gassed twice and welcomed countless times into people's homes. I interviewed a president and drag queens, persecuted Shiites and convicted terrorist bombers. I told the stories of schoolies and refugees. I made it my business to ask provocative questions. In all that time, only in that single moment during a riot on the pavement outside the vice-president's residence did I feel seriously under threat. Both the surprising outbreak of religious violence and the equally unexpected offer (from members of the same radical group) of friendly help are typical of Indonesia. It is a fabulously contradictory archipelago, in which I (generally) felt so safe, but which is about to cold-bloodedly kill two young Australian men for the crime of heroin smuggling.

Condemned Australian Myuran Sukumaran has developed a passion for art while on death row in Kerobokan prison in Denpasar, Bali. Credit:Jason Childs From the start, the advocacy of the Australian people for these two men has been ambivalent. The government has worked behind the scenes, but in the public mind, this pair - neither Caucasian nor as photogenic as Corby, and clearly guilty of smuggling heroin - did not attract our interest until the end. In many ways, because of their rehabilitation and their remorse and the fact that they face the death penalty, I believe they were worthier of our sympathy. Our failure to have more impact on Indonesia in this case of literal life and death is partly a function of ignorance on both sides. Michael Bachelard doorstopping Prime Minister Tony Abbott at the Bali bomb memorial during an APEC summit in 2013. Credit:Amilia Rosa Indonesia is difficult to get your head around. It features hundreds of different cultures and languages and is held together only because it has been so radically decentralised. It has more Muslims than any other place in the world, and more Christians than Australia. It is a post-colonial society with a chip on its shoulder about the West, which presents serious diplomatic challenges, and means Australia is both admired and abhorred.

It is usually described as peaceful, but has suffered appalling violence and murder. It has a robust, rambunctious free press, which has direct access to the people in power, but it restricts Western reporters from even visiting West Papua. A performing monkey picks lice for his owner in Jakarta. Credit:Michael Bachelard It is run by a feudal elite, but a man raised in a poor river-bank squat has just been elected President. Its people, on the whole, are delightful, open and funny. The cries of "Hello Mister!" from small children followed me wherever I went. An expatriate told me on my arrival that she had been in Indonesia for five years and the longer she stayed, the less she knew. As I came home in January, I realised the truth of her words. Aceh's wilderness is being illegally cleared to make way for palm oil plantations. Credit:Michael Bachelard

So, where to begin summarising it all? The only possible place to start is Java, the centre of political power, where 55 per cent of Indonesians live in one of the most densely populated places on earth. Javanese culture is renowned for its tolerance - it is the only way 101 million people could possibly coexist on an island half the size of Victoria. Men gather to talk in the remote highlands village of Lolat. Credit:Michael Bachelard But tolerance is a double-edged sword. It allows (mostly) peaceful coexistence, but it also means people live uncomplainingly with incompetent government, corruption, poverty and a paucity of services virtually unrivalled outside sub-Saharan Africa. While more than 40 per cent of Indonesia's population still lives on less than $2 a day, in Java at least, this super-human tolerance means complaints are hard to find.

A young asylum seeker child at a "learning centre" set up in Cisarua to educate children while they wait years for a place in Australia. Credit:Michael Bachelard My first story as correspondent featured Maya Sari, one of the poor women who stand holding their babies amid the smog and noise on the sides of Jakarta's roads in the morning rush. Called "jockeys", motorists pay them $2 to ride in their cars into the city, because to legally travel on the city's best roads in peak hour, cars need three occupants (a baby counts). Even Maya could not be induced to complain about her lot. She was her family's breadwinner, and for her it was enough. Michael Bachelard on a roadside in Kuta beach, Bali, interviewing street beggars. Credit:Amilia Rosa The tolerance of ordinary Javanese protects you from road rage in Jakarta's infuriating traffic. But it is ruthlessly exploited by the nation's wealthy elite - some of whom see themselves as having descended from the ancient Sultans - to maintain a feudal society and an chronic inequality of opportunity.

Electing Joko Widodo, a revolutionary choice for President, in July 2014, seemed to be a blow against this. But, just a few months later, he is showing a tendency to be captured by the elite. If he fails to live up to his promise to govern for the orang kecil, the little people, his popular support will crumble in a heartbeat. Indonesians are watching closely. A drag queen in a nightclub in Jakarta, photographed for a story about being gay in Indonesia. Credit:Michael Bachelard In the context of global Islam, though, tolerance is a good thing, and Indonesian Islam is, by and large, the gentlest form imaginable. It is Sunni, but influenced by the spiritualistic Sufi strain, and as it arrived from the 1200s on, Indonesia's dominant religion also incorporated enough of the pre-existing Hinduism, Buddhism, and older pantheistic faiths to become distinctively itself and broadly tolerant. That graceful old tradition is now under threat. Waves of hardliners on conversion drives deliberately undermine it by pushing a doctrinal, Arab-derived and petro-dollar-funded form of religion into the vast, poor hinterland. This new faith and the hardline groups such as Hizb ut-Tahrir who push it, find fertile ground in Java and Sumatra because many Indonesians have an inferiority complex about the old, believing it not to be pure enough, not the "real thing". The Indonesian who has performed the Haj pilgrimage; or has married a Kuwaiti; or has an Arab spiritual adviser; the Islamic school that sports Yemeni teachers, all these are afforded special social prestige because they are deemed closer to the source.

Indonesians find it difficult to speak against this new, hardline culture, because it can be painted as anti-Islam, and even moderate Indonesians will not stand for that. The doctrinal movement fed the protest over the silly, home-made film, the Innocence of Muslims, as much as it feeds the thuggery of the Islamic Defenders Front whose member menaced me and Kate. The threats from these people prevented Lady Gaga from performing in Jakarta in 2012, and saw Islamic reformist Irshad Manji almost beaten up. It also swayed the sociopaths who carried out the 2002 Bali bombing. Most Indonesians hate the thugs and extremists with passionate intensity. And yet they thrive. In the schools and mosques and in its Parliament, Indonesia is engaged in a battle for its soul. For the Indonesian elite, though, the real game is corruption. The newspapers teem with stories about it, ordinary people loathe it, and the corruption eradication commission, KPK, Indonesia's only trusted government institution, makes valiant attempts to combat it, but still it is an epidemic that undermines the national health.

Corruption and incompetence in the tax office ­means Indonesia's tax take - at 11 per cent of GDP - is among the lowest in the world and what is collected falls victim to fingers in the till. So the public servants are underpaid, the health system anaemic, the schools starved of funds, and infrastructure underdeveloped. Bureaucrats take "make-up" pay in the form of gratuities extracted from people interacting with government. Many licences or approvals require an illegal payment, and even then you cannot guarantee you will get what you have paid for. Receiving a parcel in the mail can cost more in dodgy customs duty than the value of the goods. Don't complain to the police; they are corrupt. Or take your case to the court; there is no guarantee the lawyers, the prosecutors and the judges are not corrupt also. In 2013, even the chief judge of the constitutional court Akil Mochtar - the equivalent of Australia's High Court chief justice - was arrested for taking bribes. Money can buy freedom for the guilty, or a prison term for your enemy. Two innocent teachers from the Jakarta International School are facing years in a cell because they were unlucky enough to get caught up in a system well beyond their ken. Corruption makes the simplest procedures complex, time-consuming, of unpredictable cost, and potentially high-risk. Doing business takes patience and nous. Mining, where Australia has particular expertise, is associated (both in the constitution and in the psyche of ordinary Indonesians) with nationalism, so foreign miners, no matter how well-intentioned, are often viewed as thieves attempting to steal Indonesia's wealth.

Living in Indonesia even gave me an appreciation of the benefit of plaintiff lawyers in Australia. The gaping holes in the footpath, the crazy paving and open sewers that make pedestrianism virtually impossible, even in the wealthy centre of Jakarta, would be repaired in a Western country before a blizzard of lawsuits hit. But in Indonesia, a legal remedy would require both a plaintiff willing to complain and a court system and lawyers whose decisions were not for sale. So, every city street remains an obstacle course. During my three-year stint in Indonesia, one thing became very clear: our two countries lack interest in one another, and it shows. That is not just the responsibility of politicians, but of all of us. When you tell a taxi driver you come from Australia, he is likely to say, "Ah, dekat", meaning: "It's close, a neighbour". His knowledge of Australia usually ends there (though his prejudices might not). Jakarta taxi drivers will never make it to Australia to learn more. What is inexcusable is that most Australians are similarly ignorant. We are among the world's great travellers, but we know pitifully little about the fascinating, vexing, charming, culturally rich archipelago that lies so near. With the exception of Bali (described, depressingly, in some real estate brochures as Perth's northernmost suburb) we fear Indonesia, and fly over it on our way elsewhere. The consequence is that our relationship with our neighbour is thin and suspicious, and largely determined by what we demand of it: stopping the boats, opening up its resources, providing a market for our products. When it comes to trying to saving the lives of our rehabilitated citizens, our lack of deep understanding and trust makes our cries seem plaintive and ineffective.

What we should be doing - all of us - is relishing Indonesia, exploring it, embracing its bamboozling contradictions. If it takes five years to work out what we don't know, we'd better get started on learning. The rewards are abundant: there is nothing as mouthwatering as the smoky smell of satay roasting on an open grill over coconut husks, or as spectacular as bathing an elephant in a Sumatran forest river. Little tastes sweeter than fresh rambutan bought at the side of the road. Go and see the terraced tea plantations climbing the sides of Java's volcanic foothills, or the harbour at Labuan Bajo in Flores, or Aceh's west-coast highway, or pretty much any rice paddy at dawn. They are beautiful. With the people, relationships repay time and respect and good humour and attempts to speak their language. Indonesians are our neighbours. It was a privilege to spend three years with them. Michael Bachelard was Fairfax's Indonesia correspondent from January 2012 to January 2015. He is now investigations editor at The Age.

Watch Michael's three year Indonesian assignment in video