When Barack Obama was first elected in 2008, many Indonesians were swept away in the euphoria. Someone who had spent four years in their country as a boy had become president of the United States.
Public opinion of the US improved dramatically. And, as Obama was about to accept his Nobel Peace prize in 2009, a group of locals commissioned a statue of the child Obama, and erected it in a Jakarta park.
The postponements of Obama's 2010 visit to the country - the first two due to debates about the Affordable Care Act and a third due to the BP oil spill in the Gulf of Mexico - dampened some of the enthusiasm. But his visit in November 2010 was still well received.
One religiously conservative minister even found himself in a hot water due to his enthusiasm, after he shook hands with First Lady Michelle Obama despite having previously said he didn't touch women who weren't related to him.
The US president's next visit in November 2011 was not as well received. But even as the afterglow of Obama's election began to fade, he remained quite popular in Indonesia and in the Southeast Asia as a whole.
Some Indonesians were disillusioned with Obama's policies in the Middle East, and this was reflected in slight decrease in his popularity. But it rebounded after his reelection, as memories of the Arab Spring faded and the conflict in Syria had dragged on.
By the 2014 Indonesian parliamentary election, a couple of candidates clearly believed that they would attract voter attention by putting images or photos with Obama in their campaign posters.
One such poster even brought together Obama and al-Qaeda leader Osama bin Laden, with the candidate as the peacemaker in the middle.
But expectations that the Obama administration was going to be favourable to Indonesia's interests were not met. While Obama recalled the childhood years spent in the country fondly, Indonesians soon realised that they wouldn't receive as much attention as they'd expected.
Losing the initiative
Under Obama, the United States embraced a "pivot to Asia" policy, which entailed a military and diplomatic rebalancing. It sought to move more US naval assets to the region by 2020, to deal with China's growing threat. But this policy wasn't entirely new. Even under the George W Bush administration, the United States had realised the importance of East Asia, and engaged these regions while it fought a war in Iraq.
But Obama benefited from the fact that he was not Bush, who was widely seen as a unilateralist and a warmonger. Instead, he was seen a fresh face who stressed the limits of US unilateralism, embraced multilateralism, and brought in hope and change.
In 2011, he pulled the last US troops out of Iraq, and less burdened with the war there, he could focus more on East Asia. Thus, Obama was able to strengthen US ties to India, Japan, Myanmar, and Vietnam, by taking advantage the region's unease about China's growing assertiveness.
Still, Obama was a domestic-oriented president, very conscious of the limits of the US tendency to try to influence - or rather, intervene - in world politics. Based on his experience as a child in Indonesia, he observed the resentment in countries where the US had interfered, and, in an interview in The Atlantic magazine, noted, "you can't fix everything."
He has, as a result, been very hesitant to take foreign policy initiatives without support from other countries. This led to one of his advisers to state Obama's approach to Libya was "leading from behind". Obama himself remarked that his foreign policy could be summed up as "don't do stupid shit," even though during the same interview, he argued that the US still had to set the international agenda.
But other countries, especially China, did take such initiatives. A case in point is the Asian Infrastructure Investment Bank, which well illustrates China's growing influence in its region. Despite US opposition, China managed to attract virtually every single US ally in the region, except Japan, to join the bank.
In the meantime, the 12-nation free trade agreement, the Trans Pacific Partnership, which was supposed to be the linchpin of Obama's pivot, is wobbling due to domestic politics. It has been condemned - to differing degrees - by both candidates for the 2016 US presidential election, Democrat Hillary Clinton and Republican Donald Trump.
China has also been growing more assertive in the South China Sea, projecting power in the region by building military bases on disputed islands. While the United States, launched freedom of navigation operations in the sea in reaction, it's clear that, for some countries in the region, the US has lost the initiative.
With its growing military presence and economic diplomacy under the "One Belt One Road" policy, China's answer to Obama's pivot seems to be the future.
Thus, Philippine President Rodrigo Duterte could well feel justified in declaring that "America has lost", regardless of his personal dislike of the United States. Granted that his officials tried to backtrack from that remark later, and the fact that the US remains wildly popular in the Philippines, it's doubtful whether Duterte could pushed the envelope as far as he has done had the United States been on the front foot in the region.
Not surprisingly, other ASEAN countries, including Indonesia, in the end simply hedged their bets. They're afraid of China but, at the same time, they are open to economic benefits stemming from one of the world's largest economies. They know that, while the US will always try to contain China militarily, it moves too slowly to challenge Chinese economic initiatives.
Stanford University professor emeritus Donald Emmerson has neatly captured this attitude, with the rhetorical question:
Why not prolong the happy combination of American ships for deterrence and Chinese markets for profit?
What lies ahead
The next president of the United States will inherit a huge burden. After a series of campaign messages that managed to offend many people, Trump doesn't have much goodwill in the region. His anti-Muslim rhetoric alienates many moderates in Indonesia, which has the world's largest Muslim population (more than the entire Middle East combined).
But Indonesians are very pragmatic. As long as Trump manages to offer some good deals, they will ignore his past trespasses. Still, if he becomes president, he shouldn't expect a smooth ride in the region.
Hillary Clinton, on the other hand, will most likely continue Obama's policies to prop up, strengthen and expand the liberal order in Asia. Like Obama, expectations of her are high, and meeting them will be difficult. People will expect her to keep or to "improve" the Trans Pacific Partnership, for instance, despite of her opposition to it during the campaign. Should she be unable to deliver, she will have much bumpier road ahead.
The author would like to thank Bradley Nelson, adjunct instructor of political science at Saint Xavier University, for his suggestions during the writing of this article.