Twelve people -- including five hostages -- were killed in northeast Brazil on Friday after police foiled a gang of armed robbers staging simultaneous pre-dawn assaults on two banks in the town of Milagres, officials said.

The five dead hostages were members of the same family and included two children, the local mayor, Lielson Landim, told the Folha de Sao Paulo newspaper. They had been returning from a nearby airport when some of the robbers seized them.

The secretary for security in the state of Ceara, Andre Costa, said in a statement that an investigation was being carried out to identify those killed and the circumstances of their deaths.

Costa did not say whose bullets killed the hostages. Landim had earlier said that, based on initial information, he understood that "the criminals killed the hostages and the police killed the criminals."

Two suspects were arrested, according to Costa's office.

"A heavily armed group arrived in the town in the early hours and went to the center of town, where they tried to commit the crime. There was an exchange of fire between the suspects and police," it said.

It said six gang members were killed and "another six people died from gunshots."

The identity of the 12th victim was not immediately clear.

Various weapons and explosives as well as three vehicles used in the bank assaults were recovered.

'Cowering' residents

The gang had launched simultaneous assaults on two banks on the same street in Milagres -- population 28,000 -- shortly after 2:00 am (0400 GMT).

According to the G1 news website, the robbers had blocked a street with a truck and stopped the car carrying the family, which included relatives who had just arrived on a flight from Sao Paulo to celebrate Christmas with them.

G1 reported that the robbers "executed" the hostages when police turned up. It said some of the gang managed to escape.

"I've never seen anything like it. I stayed inside my home, cowering and afraid," a local resident, Mendonca de Santa Helena, told media. "I heard people yelling and crying. It was horrible."

Shaken by the violence, the municipality of Milagres suspended most of its activities on Friday and asked residents to stay at home "until order is restored."

Brazil is one of the most violent countries in the world, suffering nearly 64,000 murders last year -- a homicide rate of 30.8 per 100,000 inhabitants that is three times higher than the level the United Nations considers to be endemic violence.

On January 1, a far-right politician promising a relentless crackdown on crime, Jair Bolsonaro, will become Brazil's new president following his election in October.