JAKARTA, Indonesia -- Indonesia's opposition leader and losing presidential candidate said Monday that he will join his election rival's Cabinet to help strengthen the country's defence, signalling a calming of political tensions in the world's third-largest democracy.

Former special forces general Prabowo Subianto said he was asked by President Joko Widodo to join the Cabinet, which will be announced on Wednesday.

Widodo, who was sworn in for his second term on Sunday, said Indonesians should unite after the bitter election campaign.

Subianto, who is also the founder and leader of the Gerindra party, had been negotiating with Widodo's governing coalition for Cabinet positions following the divisive April election.

"We have been asked to strengthen the Cabinet in the defence area and we are ready to help," Subianto told reporters after meeting with Widodo at the presidential palace in the capital, Jakarta. "I will work hard to meet his goals and expectations."

Subianto declined to say if he had been asked to become defence minister as widely speculated by local media.

Subianto had initially refused to accept the election results. He alleged massive and systematic fraud, but his legal challenge was rejected by the country's top court last month.

Nine people died in riots in May after official results showed that Widodo had won 55.5% of the vote.

Subianto, linked to human rights abuses during the authoritarian rule of longtime President Suharto, also unsuccessfully challenged his presidential election loss to Widodo in 2014 and has now made four unsuccessful bids for the presidency.

Andreas Harsono, Indonesia researcher at Human Rights Watch, said Subianto's entry into the Cabinet was a conservative backlash against Widodo's efforts to address Indonesia's poor human rights record.

"It's a dark day for human rights and justice in Indonesia," Harsono said.

Nadiem Makarim, CEO and co-founder of ride-hailing startup company Gojek, and Erick Thohir, a former owner of the Inter Milan soccer club, also said following meetings with Widodo on Monday that they will be part of the new Cabinet.

Indonesia, the world's most populous Muslim-majority nation, is an outpost of democracy in a Southeast Asian neighbourhood of authoritarian governments and is forecast to be among the world's biggest economies by 2030.

Widodo's second term could further cement the country's two decades of democratization and see progress in his signature policy of upgrading the sprawling nation's inadequate infrastructure.

Subianto, who allied himself with groups that want Islamic rather than secular law to prevail in Indonesia, won big victories in conservative provinces, but Widodo prevailed nationally with the backing of mainstream Muslim organizations and minority voters.