Police officers and firefighters in Rio de Janeiro have ended their pay strike, days before the annual carnival.
Union officials in the Brazilian state said a vote on Monday had agreed to stop the demonstration over pay.
Earlier, officials said the strike had had only a limited effect and one police force had decided to suspend its action.
Police in the state of Bahia voted at the weekend to end their 12-day strike after being offered a 6.5% wage rise.
Officials in Bahia said they had also agreed that none of the officers who stopped work would be punished.
The stoppage had led to an increase in reported murders and violence before troops and federal police were deployed to keep order.
In Rio de Janeiro, police and firefighters took action despite being offered a 39% increase in pay.
Trade unions said this was not enough to make up for decades of falling wages.
On Sunday, some 400 people demonstrated on Copacabana beach to call for the release of several arrested officers, who they say have been locked up in maximum security prisons with criminals they put behind bars.
Rio’s carnival is the world’s largest and gets under way on 17 February.
The venue for the parades, the Sambadrome, has been completely refurbished over the past 10 months.