SÃO PAULO, Brazil—Armored personnel carriers on loan from the Brazilian military rumbled through the streets of Rio de Janeiro as police with assault rifles battled heavily armed gangs for a fifth day, raising concerns about the seaside city's ability to keep visitors safe when it hosts soccer's 2014 World Cup and the 2016 summer Olympic Games.

Authorities said the death toll had hit at least 23 since Sunday night, including a teenage girl hit by a stray bullet, as live television carried scenes of paramilitary police shooting...