Anna Hazare
Veteran Indian social activist Anna Hazare gestures to his supporters on the first day of his fast against corruption in New Delhi, July 29, 2012. Reuters

India’s parliament approved a landmark measure to appoint an independent anti-corruption ombudsman, with powers to prosecute politicians and civil servants, in a move that ends a mass campaign headed by activist Anna Hazare, who has launched several hunger strikes over the last two years to pressure lawmakers to pass the bill.

The Lokpal and Lokayukta Bill, 2013, was passed after eight failed attempts spanning almost half a century, and the decision came only a few days after the ruling Congress party suffered a major blow in state elections, including in the state of Delhi, which is home to the nation's capital, New Delhi. The anti-corruption law, which follows a key food security bill adopted in September, comes ahead of a national election in the first half of 2014.

“Lokpal Bill alone is not enough to fight corruption. What we need is a comprehensive anti-corruption code,” Rahul Gandhi, vice president of the Congress party, which leads the ruling United Progressive Alliance, said as the debate began on the bill, Press Trust of India, or PTI, reported. “We should complete the unfinished work of fighting corruption...Six anti-corruption bills are pending.”

Hazare ended his nine-day fast soon after the lower house of India's parliament passed the bill on Wednesday. The parliament's upper house had approved the bill Tuesday, and it now needs to be signed into law by President Pranab Mukherjee.

The new law will bring all government departments and offices, including the prime minister’s office, under the purview of the ombudsman who will be appointed by a committee, which would include the prime minister, the chief justice of the apex court, the leader of the opposition, and a legal expert.

“The bill is the result of the government realizing which way the wind was blowing on corruption,” Arun Jaitley, a senior leader of the main opposition Bharatiya Janata Party, which supported the measure, said according to media reports.

Samajwadi Party, a regional party based in the northern state of Uttar Pradesh, opposed the bill saying it would further hinder government functioning, because officials and ministers would be worried about investigations.

India is ranked number 94 among 177 nations on a global corruption perceptions index published by anti-corruption watchdog, Transparency International, scoring lower than its major emerging-economy peers such as China, South Africa and Brazil.