US President George Bush shrugged off massive protests against his visit to the world's most populous Muslim nation yesterday as a sign of a healthy democracy, as thousands braved heavy rains to call him a war criminal and a terrorist.
Bush also pledged to work with Indonesia's government to fight Islamic extremists.
The archipelago is considered an important ally in Washington's war on terror, but public anger is high over US foreign policy in the Middle East and the invasions of Iraq and Afghanistan, seen by many here as attacks on their faith.
Bush and President Susilo Bambang Yudhoyono held "frank" and "sometimes critical" discussions on those issues, the Indonesian leader said, and also talked about ways the US could help fight a spiraling bird flu outbreak, set up a tsunami early warning system and improve education.
Security was tight amid reports that al-Qaida-linked militants could try to disrupt Bush's six-hour visit to the sleepy city of Bogor, just south of the capital, Jakarta, with thousands of rifle-toting soldiers patrolling the streets, mobile phone signals jammed, and water cannons deployed.
Demonstrations by Islamic hard-liners, students, housewives and taxi drivers have been staged every day this month and nearly 10,000 turned out to meet the US president on Monday, some holding banners that said "Bush is a terrorist!" and "Go to Hell."
Others called him a war criminal and chanted "Allah Akbar" or "God is great." Students in at least two cities tried to seal off American-owned restaurants, sometimes clashing with police.
But Bush, wrapping up an eight-day Asia tour that also took him to Vietnam and Singapore, was unruffled.
"I applaud a society where people are free to express their opinion," he said at a joint news conference at the Bogor Palace, a graceful presidential retreat surrounded by vast gardens. "People protest. That is a good sign of a healthy society."
Indonesia is a secular nation with 190 million mostly moderate Muslims, but Islamic fundamentalists are quickly gaining a foothold.
The Jemmah Islamiyah militant group has carried out a series of suicide bombings targeting Western interests since 2002, including two on the resort island of Bali and two others in Jakarta.
The attacks have killed more than 240 people, many of them foreign tourists.
"American people and Indonesian people have both suffered from acts of violence from extremists," Bush said, holding Indonesia up as an example of how democracy and modernization can provide an alternative to extremism.
"Our nations are determined to take effective action against terror network that plot new attacks against innocent people."
Bush also said he was happy receive advice from Yudhoyono on global issues, including the North Korean and Iranian nuclear disputes.
The Indonesian leader called on other nations to do more to help find ways to end the conflict in Iraq, saying it was not just up to Washington to come up with a solution. He also urged Bush to speed up a timeline for the establishment of an independent Palestinian state.
"The people of Indonesia should know that when their elected leader speaks, other leaders listen, as do I," the US president said.
The White House said it was comfortable with security arrangements despite warnings by Bogor's police chief on Monday that authorities were investigating unconfirmed reports that a man wearing a suicide vest would try to infiltrate protests on Monday.
The terror threat never materialized.
When Bush last visited in 2003, talks with were focused primarily on Islamic extremists.
Happy with Indonesia's response - hundreds of terror suspects have been arrested and put on trial - Washington ended an arms embargo last year that was imposed in 1999 over human rights concerns.
Bush this time was seeking to broaden relations with Indonesia, offering help in everything from finding ways to alleviate poverty and develop alternative sources of energy, to battling illegal logging and corruption.
"It's important to our nation that we have good, strong relations with Indonesia," said Bush, who left Indonesia Monday night for Hawaii, his last stop before heading home. "It's a relationship that should last for decades to come."
Yudhoyono, meanwhile, conducted an elaborate balancing act by welcoming Bush in such grand style.
He needs US help combatting a bird flu outbreak that has killed 56 people - a third of the world's total - and in improving economic growth in his country which remains desperately poor eight years after former dictator Suharto's was ousted amid street riots.
But Indonesia's first directly elected leader risked further angering Muslim parties and his political rivals who already accuse him of being subservient to the West.