Barack Obama, who lived in Indonesia as a child, ends family trip in historic city where his mother researched her PhD

Barack Obama has ended a five-day family holiday to Indonesia by visiting Yogyakarta, an ancient and artsy city around which his anthropologist mother spent years doing research into village life.

The former US president – who lived in Indonesia during his childhood – his wife Michelle and daughters Malia and Sasha, had spent three days in the resort island of Bali, where they were photographed river rafting.

Nerdy Wonka (@NerdyWonka) President Barack Obama is living his best life. #Bali #Indonesia pic.twitter.com/uhAGBgsmhz

Nerdy Wonka (@NerdyWonka) Our beloved First Family and President Obama's sister's family hanging out in Bali. #Ubud #Bali #Indonesia pic.twitter.com/fvwLxc6ICD

The former first family arrived by private jet on Wednesday to a military airport in Yogyakarta, where authorities said about 650 Indonesian security forces were deployed to protect them.

CNN Indonesia (@CNNIndonesia) Sungai dan Sawah Jadi Tempat Rekreasi Obama di Bali https://t.co/t1NdD3MyPq

First on their itinerary for the two-day visit was Borobudur, a ninth-century Buddhist temple complex.

TWC BOROBUDUR (@BorobudurPark) Welcome back to Borobudur,

Mr. Barack Obama.



Hopefully this visit brings back your childhood memories of Wonderful Indonesia. pic.twitter.com/GYF1LLQ6Df

They are also expected to visit the Hindu temple of Prambanan.

detikcom (@detikcom) Obama Tiba di Candi Prambanan Yogyakarta https://t.co/PVjcREfFH1 pic.twitter.com/zld0H9HlVd

Obama’s mother, Ann Dunham, met the future president’s father at the University of Hawaii but later remarried an Indonesian man and the family moved to Jakarta in 1967 when Obama was six.

When that marriage also broke up, Dunham moved to Yogyakarta to study indigenous craft industries and Obama returned to Hawaii aged 10 to live with his grandparents.

Nerdy Wonka (@NerdyWonka) President Obama gives his family a tour of Yogyakarta, where he lived for a while as a child.



First stop? The Borobudur temple. #Indonesia pic.twitter.com/A1kA5sfVkV

Acquiring grants from international foundations, Dunham worked in development, helping villagers to get loans to launch small businesses.

The region was the subject of her PhD thesis, Peasant blacksmithing in Indonesia: surviving and thriving against all odds, which details life in a village an hour’s drive along a dirt road south of Yogyakarta. Dunham described local customs, eating habits and how women ran agriculture.

Indonesia’s president, Joko “Jokowi” Widodo, suggested the trip to Obama, who is also scheduled to speak at an Indonesian diaspora congress in Jakarta on Saturday.

The Associated Press contributed to this report