US President George W Bush has made a brief but controversial visit to Indonesia for talks with his opposite number, Susilo Bambang Yudhoyono.
There have been daily anti-US rallies in recent weeks
The two men met in the Javan city of Bogor and discussed security, trade and health issues.
Hundreds of protesters gathered in Bogor to complain about US foreign policy in Iraq and Afghanistan, though no violence was reported.
Mr Bush said the protests were a sign that Indonesia had "a healthy society".
US foreign policy provokes deep anger among some groups in Indonesia, the world's most populous Muslim nation.
But the country is a key regional ally for the US in the fight against terrorism, and ties between the two governments have strengthened in recent years.
Mr Bush met Mr Yudhoyono in a secluded presidential palace in Bogor, a former capital about 60km (40 miles) south of Jakarta.
Nearly 20,000 troops were deployed to deter protesters, some of which carried banners calling Mr Bush a "terrorist".
On Sunday, demonstrators gathered in Jakarta to stage the latest in weeks of anti-US protests.
Security has been tightened ahead of Mr Bush's arrival
Most of the protesters simply wanted to voice their opposition to US policy in the Middle East and to the US-led invasions of Iraq and Afghanistan.
Speakers also criticised Mr Yudhoyono for inviting Mr Bush, and for the cost of the security arrangements for the visit.
The leader of one militant Muslim group, the Islamic Defenders Front, said it was permissible under Islamic law to kill Mr Bush.
Habib Rizieq said Mr Bush should die because he had "committed crimes against humanity", reports said.
Mr Bush arrived in Indonesia from Vietnam, where he attended the Apec summit at the weekend.
In contrast to the protests in Indonesia, the US president was greeted by cheering crowds as he visited Vietnam's Ho Chi Minh City, formerly known as Saigon, on Monday morning.
Thousands of people lined up to wave to his motorcade as he passed through the site of one of the most crushing military defeats in US history, the BBC's Bill Hayton in Vietnam says.