The lower house of India's parliament has approved a new anti-corruption bill under which an independent ombudsman will have powers to prosecute politicians and civil servants.
On Tuesday, the upper house passed the so-called Lokpal bill, a main demand of campaigners led by Anna Hazare.
The bill will have to be signed by the president to become law but that is a mere formality, correspondents say.
Mr Hazare ended his nine-day hunger strike after the bill was approved.
The bill was first introduced in parliament in 2011 after a 12-day fast by Mr Hazare.
The lower house passed it but the upper house did not.
This time round, in a rare show of unity, the governing Congress party and the main opposition BJP supported the passage of the bill in both houses.
However, the regional Samajwadi Party, an ally of the Congress, which had said it would oppose the measure "tooth and nail" walked out in protest and did not participate in voting in either of the houses.
Because the upper chamber introduced amendments, the bill had to be approved once again by the lower house.
Renewed support for the bill in parliament comes ahead of general elections next year and after a strong showing in state elections in Delhi this month by a new anti-corruption party.
Its leader, Arvind Kejriwal, a former top aide of Mr Hazare in the anti-corruption campaign, has said the Lokpal bill in its current form is "weak".
A string of major corruption scandals has damaged the Congress-led government's reputation in recent years.