Brazil’s Congress has rejected a proposed constitutional amendment that was a key grievance of protesters who took to the streets across the country.
Demonstrators had argued PEC 37, which would have limited the power of federal prosecutors to investigate crimes, might open the way for more corruption.
On Tuesday, the measure was defeated by 430 votes to nine.
Congress also voted to use all the royalties from newly discovered oil fields for education and health.
Some of the largest oil finds in recent years have been discovered off the Brazilian coast and the country is expected to be able to produce tens of billions of barrels of crude oil over the coming decades.
However, many of the finds are “pre-sal” (“beneath the salt”) reserves, located deep in the ocean floor.
The process of extracting oil from such depths carries huge risks and requires new technologies, and will take time.
Congress voted to allocate 75% of the royalties of those newly-found pre-sal sites to education and 25% to health, but it is not clear when those royalties would start coming in.
The PEC 37 constitutional amendment rejected on Tuesday had been a thorn in the side of many protesters and its defeat has been described by one national newspaper as a direct result of “pressure from the streets”.
The amendment would have assigned the power to conduct criminal investigations exclusively to the police, thus removing the role of federal prosecution service from the evaluation of criminal charges.
Its critics said it would have affected the ability of prosecutors to conduct effective, fair and impartial criminal investigations, including those into organised crime and corruption.
In another move to try and pacify protesters angry at a broad range of issues, including poor public services, high levels of corruption and the high cost of hosting major sporting events such as the 2014 World Cup and the 2016 Olympics, the government also promised to speed up the pace of reform.
The government said it would simplify a referendum to establish a constituent assembly – proposed on Monday by President Dilma Rousseff – in order to allow for a vote as early as 7 September.
Ministers suggested they would focus on a more straightforward referendum proposing political reform.
It could address “concrete questions”, such as campaign financing and political representation, they said.
Education Minister Aloisio Mercadante said the government wanted political reform with “wide public participation”.
“We want [the referendum] to happen as soon as possible,” he said.
A controversial measure to recruit more foreign doctors to address a shortfall in the health system is also going ahead despite the objections of organisations representing Brazilian medical practitioners.
The sudden burst of initiatives is not confined to the government, BBC Brasil’s Gary Duffy in Sao Paulo says.
The president of the senate, Renan Calheiros, has proposed free transport for all students.
Various city authorities have reversed increases in public transport fares that were a source of widespread public anger.
‘Pressure from the streets’
Our correspondent says the flurry of political activity is taking place ahead of a series of demonstrations in various Brazilian cities on Wednesday.
One of the largest is due to take place in the city of Belo Horizonte where Brazil’s football team will play Uruguay in the semi-final of the Confederations Cup.
There is a public holiday in the city, and tens of thousands of protesters are expected. A protest group has promised to start the day demonstrating in front of the national team’s hotel.
The cost of the World Cup, for which the Confederations Cup is a dress rehearsal, has been a key issue in recent protests.
Security will be tight with thousands of police on duty and other special forces on standby.
There were violent clashes in Belo Horizonte on Saturday during another protest.
The nature of the demonstration is likely to be seen as an early test of whether the rash of political concessions is having an impact, our correspondent adds.
The wave of rallies in more than 100 cities began in Sao Paulo, where residents were unhappy at planned rises in public-transport fares.
Those increases have since been shelved, but the protests spread across Brazil, and the protesters’ demands have become more wide-ranging.