SAO PAULO, Brazil - As many as 300 striking police officers and their relatives held out Tuesday as heavily armed soldiers blockaded a state legislature building in northeastern Brazil.

About 1,000 soldiers and officers from an elite federal police unit ringed the building in the Bahia state capital of Salvador, Brazil's third-largest city with 2.7 million people and a scheduled host for matches during the 2014 World Cup.

The striking officers, some armed with handguns, were demanding pay raises and amnesty for what a judge ruled an illegal work stoppage.

Authorities said some children and wives of officers were inside the building, but it was not clear how many. Some had left during the previous 24 hours.

About one-third of Bahia's 30,000 police went on strike a week ago, and murders in the capital's metropolitan area immediately spiked to double normal rates. Official say there have been at least 100 murders since Jan. 31, when the strike began.

But violence has plummeted after some 2,000 troops and 600 elite federal police were sent in Sunday and began patrolling the city in armoured personnel carriers.

Soldiers in camouflage and toting long rifles have taken up posts on street corners in the city's historic centre and on its beaches, where tourists are concentrated. Schools were mostly shut, many businesses were closed and the streets were unusually empty.

Jaques Wagner, the governor of Bahia state, said Tuesday that negotiators were talking with union leaders inside the legislature building, and he expressed optimism that the standoff would end peacefully soon.

The governor told TV Bahia that he is "offering consistent proposals so that we can finish this situation today."

Wagner said the talks lasted late into the night on Monday, a "good signal" that progress was being made.

The strikers have narrowed their demands to amnesty for the walkout and payment of bonuses that would add about $350 a month to officers' paychecks.

Monthly salaries for officers in Bahia now range between $1100 and $1330, depending on rank and experience.

The state government has offered a raise of 6.5 per cent and no amnesty for the striking officers.

A state judge last week ruled the strike illegal, saying striking officers who do not return face fines of $45,000.

Over the weekend, Wagner accused some of the striking officers of being behind the wave of violence that hit the city in the first days of the strike. He called it a "bloodbath" aimed at creating fear. Some striking officers were detained for allegedly organizing roving gangs and robbing police cars.

The standoff has been hurting the economy of a city that hosts Brazil's second-largest Carnival celebration, set to open in 10 days. Several concerts were cancelled last weekend because of fears about security.

On Monday, the U.S. Embassy in Brazil warned against travel to Salvador or Bahia.

Tourism officials from Bahia have denied rumours that the entire Carnival celebration will be cancelled if the strike continues, but the Brazilian Association of Tourism Agencies said at least 10 per cent of tourists planning to visit the city during Carnival have already cancelled their trips.