A woman has been killed in a shoot-out after armed men burst into a tourist hotel in the Brazilian city of Rio de Janeiro, police say.
A group of about 30 people were taken hostage at the Hotel Intercontinental, in the Sao Conrado area, after a gun battle with police in a nearby street.
The hostages were reportedly released unharmed when police cornered the gunmen in the hotel kitchen.
Seven people were wounded, and nine suspected gang members were arrested.
Jose Mariano Beltrame, head of public safety for the state of Rio de Janeiro, told AFP news agency after Saturday's gun battle at the five-star hotel: "Unfortunately in Rio we have drug traffickers with barbaric tendencies, and when they run into the police these things happen."
The drama started when officers on patrol near Rocinha, the city's most populous shanty town, ran into a group of "criminals" early on Saturday, police spokesman Colonel Lima Castro told CBN radio.
"There was a shootout, and two police officers were slightly wounded," Mr Castro is quoted as saying.
The woman, described as a bystander, was killed in the exchange of gunfire as she was getting out of a taxi, it was reported. However police later said she was a gang member, according to AFP.
A witness, who was too fearful to reveal his name, told Reuters: "I have never seen so many criminals together. All of them were wearing the same outfit, like uniforms, and were on the streets shooting into the open air. It was a war zone."
Amateur footage taken from nearby buildings and broadcast on local TV showed scores of people running down the street screaming, some fleeing and others waving their weapons and firing.
Some of the gunmen fled, but according to witnesses about 20 ran into the hotel and held 30 guests and hotel workers hostage.
Other TV images showed a unit of Brazil's elite military police entering the hotel and evacuating approximately 400 guests.
The stand-off ended several hours later when the gunmen surrendered and released their hostages.
Police are under pressure to crack down on lawlessness in Rio de Janeiro, which will be one of the cities hosting the 2014 football World Cup, as well as the venue for the 2016 summer Olympics.