JAKARTA: Indonesia’s Parliament passed a law scrapping direct local elections, ending a decade-long system of regional democracy that produced incoming leader Joko Widodo and handing a victory to his political opponents.

The Parliament, where parties supporting Widodo are in a minority, approved an amendment to a law on governance that will see local assemblies again choosing their leaders. President Susilo Bambang Yudhoyono’s Democrat party, whose members walked out during the late-night debate on the changes, will challenge the outcome in court, he said Friday in Washington.

The vote is a setback for the world’s third-largest democracy and Widodo, known as Jokowi, who started in politics as mayor of the city of Solo, said Keith Loveard, head of risk analysis at Jakarta-based security company Concord Consulting. The bill, opposed by Jokowi, was sponsored by the “Red and White” coalition of losing presidential candidate Prabowo Subianto, which holds about three-quarters of seats in Parliament.

“It represents a counter-attack of elite politicians concerned that their domination is being threatened by populist leaders like Jokowi,” Loveard said. “It is possible that there will be a move to reinstall the upper house as the body to choose the president and that is certainly one factor that needs to be watched.”

The government in Jakarta began to transfer power to the regions after the fall of dictator Suharto in 1998, seeking to head off various secessionist movements and to better address local development in an archipelago that would stretch from New York to Alaska.

Before the era of direct election, the system of local assemblies between 1999 and 2004 fueled corrupt governance, said Kevin O’Rourke, a political analyst and author of “Reformasi: The Struggle for Power in Post-Soeharto Indonesia.” Prabowo, a former special forces general under Suharto who questioned during the election campaign if direct elections suit Indonesia’s culture, may now seek to have supporters gain control of most regional posts, he said.

“If so, this would place a check on the ability of President Widodo to implement policies and programs smoothly,” O’Rourke said Friday in an e-mailed note. “Ending direct regional elections accomplishes the goal in part — it cuts off the main avenue for outsiders to reach the presidency and threaten the established elite.