Outgoing Indonesian President Susilo Bambang Yudhoyono announced Tuesday he would issue a decree to reverse a controversial law which scraps the direct election of local leaders.

The law that strips the people of the power to elect district leaders, mayors and governors was passed by parliament in the early hours of Friday morning and is seen as a major blow to Indonesia's young democracy.

It states that such leaders will be chosen by local parliaments, prompting a major backlash from everyday Indonesians who accused the president of supporting the law after his party refused to vote and handed victory to its supporters.

"This is politics -- I will take the risk and have decided to issue a presidential decree. We will see whether or not the House fully accepts it," he told reporters in Jakarta after returning from the UN climate summit in New York, where he was during the parliamentary vote.

Yudhoyono has borne the brunt of criticism since the bill passed, with netizens tweeting feverishly with the hash tag #ShameOnYouSBY.

Yudhoyono was Indonesia's first directly elected president. He steps down on October 20 after serving the maximum two five-year terms.

The vast majority of members of parliament from his Democratic Party had opposed handing the power to elect leaders to local parliaments.

But they abstained from voting after their 11th-hour proposal to keep direct elections on 10 conditions, or "improvements", was rejected by the House speaker.

The parties that supported the bill were those which back former general Prabowo Subianto, the only opponent of President-elect Joko Widodo in the July election.

The law's passage is seen by analysts as revenge and a way to stop figures like Widodo rising through the ranks.

Widodo was elected by the people as a mayor before becoming Jakarta governor and then winning the presidential poll.

Parliament ended its five-year term on Tuesday, and any opposition to Yudhoyono's decree will be voiced by newly elected members, the majority of whom are in Prabowo's coalition.

"If the (incoming) House takes note and listens to the aspirations of the people, it will keep direct elections with the improvements we have proposed," Yudhoyono said.

His second term has been dogged by complaints of inaction and corruption scandals in his party and cabinet.

But political analyst Paul Rowland said that it was unlikely Yudhoyono had wanted his party to walk out of the parliamentary session.

"He understands that this about his legacy, so I don't think this is a matter of the hash tag went out and he changed his mind," he said.