By JOE COCHRANE
JAKARTA, Indonesia — Indonesia’s outgoing Parliament unexpectedly passed legislation early Friday eliminating direct elections for provincial governors, district chiefs and mayors, a move denounced by critics as a major setback for the country’s democratic transition and a naked power grab by its wounded political elite.
The legislation, which does not need endorsement by the country’s departing president, Susilo Bambang Yudhoyono, stipulates that regional government leaders will now be appointed by local elected legislatures. It passed by a vote of 226 to 135.
The move by the House of Representatives at nearly 2 a.m. Friday, in the waning hours of its five-year term, was viewed by analysts as political payback after the recent presidential election victory of Joko Widodo, the popular governor of Jakarta and a two-time provincial mayor.
On July 9, Mr. Joko, who was born in a slum in Central Java Province and is a former carpenter, defeated Prabowo Subianto, a former Army general and son-in-law of Suharto, the dictator who was forced to resign in 1998.
It was the first time in Indonesian history that a candidate who was not part of the Suharto-era political elite or a general had won the presidency.
A group of political parties that had supported Mr. Prabowo’s presidential campaign, and had not previously opposed direct elections, suddenly changed its position after his defeat, in which he received 47 percent of the vote to Mr. Joko’s 53 percent.
Before Friday’s vote, Mr. Joko, who will be sworn in on Oct. 20, told reporters that eliminating direct elections at the regional level was “a setback for democracy” in Indonesia. During Mr. Suharto’s 32-year rule, his military-backed government appointed local leaders and rigged direct elections for the national Parliament.
Lawmakers nonetheless passed the legislation, which will amend the country’s decentralization law and take effect in a few weeks, after more than 12 hours of often-raucous debate that was broadcast live on national television.
The legislation had appeared destined to fail until the parliamentary faction of Mr. Yudhoyono’s governing Democratic Party — which will be out of power next week — abruptly walked out of the session after midnight when its proposed amendments for stricter control of direct elections were rejected.
The walkout denied supporters of direct local elections more than 100 votes and handed victory to the coalition supporting Mr. Prabowo and his opposition Gerindra Party. That coalition will hold the majority of seats when the new Parliament convenes next week.
In recent days, Mr. Yudhoyono said he supported direct local elections in Indonesia.
“It’s a very sad story for our democracy and a sad legacy for President Yudhoyono,” said Titi Anggraeni, executive director of the Association for Elections and Democracy, a nongovernmental organization, adding that Mr. Prabowo’s coalition acted out of spite.
“Suddenly they changed their view because of the results of the presidential election,” she said.
Yasona Laoly, a lawmaker from Mr. Joko’s Indonesian Democratic Party of Struggle, which placed first in the country’s April legislative elections, said the party was angry that Mr. Yudhoyono’s Democratic Party withdrew support at the 11th hour.
“When the Democrats said yes for direct regional election, it was just part of an image campaign to win public support,” he said after the vote.
Sarwono Kusumaatmadja, a former Suharto-era cabinet minister who now advises Transformasi, an Indonesian public policy institute, said before the vote that the legislation was a brazen attempt to prevent another politician from outside the Jakarta-based political elite, like Mr. Joko, from becoming president.
However, senior members of Mr. Prabowo’s party said direct local elections were too costly, had caused violent local conflicts in the far-flung archipelago nation of 250 million people, and had ultimately led to corruption by hundreds of elected heads of provincial-level governments.
“We have had a bad experience with regional elections, so we want to change. What’s wrong with change?” said Fadli Zon, vice chairman of the Gerindra party.