Police have ended their strike in a north-eastern Brazilian state, though a similar action in Rio de Janeiro continues days before carnival draws 800,000 tourists.

Police in Bahia voted to end a 12-day walkout during which the homicide rate doubled to more than 130 in Salvador, the state capital.

The strikes stoked concerns about security for the 2014 World Cup and 2016 Olympics.

Ivan Leite, one of the strike leaders in Bahia, said after a union meeting late on Saturday that mounting public pressure to halt the action before Salvador's carnival had influenced officers' decision.

"We were being played against society," Leite said, adding that officers voted to end the strike to end the "suffering" of the population.

But authorities said a government decision on Friday to halt salary payments to any officers still on strike had more influence on the vote.

Alfredo Castro, head of police in Bahia state, said that more than 3,000 army soldiers who were deployed to Salvador and smaller cities would continue to patrol until the carnival ended next week to ensure safety and an orderly transition as police return to their posts.

Through negotiations, officers in Bahia received a 6.5% pay raise, rights to some bonus payments and an amnesty against the punishment of any striking officers as long as they did not commit any crimes during the stoppage.

Authorities had accused some officers of causing panic by encouraging looting and of using police cars while on strike, which they labelled as theft of public property. Officials are seeking the arrest of about a dozen officers, and the head of the union that called the strike is in custody.

The pay increase adds about $350 a month to officers' paychecks. Monthly salaries for officers in Bahia previously ranged between $1,100 and $1,330, depending on rank and experience.

The strike in Rio state entered its third day, but few of the city's 58,000 officers appeared to take part. Rio was calm on Sunday and pre-carnival parties drew tens of thousands during the weekend with no serious problems.

Rio's security forces decided to walk out on Friday to demand a pay raise, not content with a last-minute legislative approval of a 39% increase staggered over this year and the next.

The base pay for police starts at about $960 per month in Rio state. It can go to $1,170 for a starting officer willing to participate in available training courses, the department said.

There were concerns that the Rio police strike would cripple the city's carnival celebrations, which pump more than $500m a year into the economy.