Indonesian President Joko Widodo has named his election rival as his defense minister and added technocrats and entrepreneurs to his Cabinet.

Widodo was sworn in Sunday for his second term. He promised to promote professionals to top posts rather than party officials.

Former Gen. Prabowo Subianto lost the past two elections to Widodo. But he said Monday he would join the president's Cabinet to help strengthen the country's defense.

Indonesian President Joko Widodo, front row fourth from left, and his deputy Ma'ruf Amin, fifth from left, wave at the media as they pose for photographers with their new cabinet ministers during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)

Indonesian President Joko Widodo, front row fourth from left, and his deputy Ma'ruf Amin, fifth from left, wave at the media as they pose for photographers with their new cabinet ministers during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)

In other Cabinet appointments announced Wednesday, Sri Mulyani Indrawati, who was managing director at the World Bank, was reappointed finance minister.

Nadiem Makarim, CEO and co-founder of ride-hailing startup company Gojek, was named education and culture minister, and Erick Thohir, a former owner of the Inter Milan soccer club was named minister of state-owned enterprises.

Newly appointed Defense Minister Prabowo Subianto, who is the former rival of Indonesian President Joko Widodo in last April's election, stands up as he is introduced by Widodo, right, during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)

Newly appointed Defense Minister Prabowo Subianto, who is the former rival of Indonesian President Joko Widodo in last April's election, stands up as he is introduced by Widodo, right, during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)

Indonesian President Joko Widodo, front row sixth from left, and his deputy Ma'ruf Amin, seventh from left, pose for photographers during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)

Indonesian President Joko Widodo, front row sixth from left, and his deputy Ma'ruf Amin, seventh from left, pose for photographers during the announcement of the new cabinet at Merdeka Palace in Jakarta, Indonesia, Wednesday, Oct. 23, 2019. (AP PhotoDita Alangkara)