APARECIDA DE GOIANIA, Brazil (AP) _ Using helicopters and highway roadblocks, police on Thursday set up a nationwide dragnet for inmates who fled a maximum-security prison with hostages, guns, cellular phones and $100,000 in cash.

Six hostages used as human shields during Wednesday's escape from the Agro-Industrial Penitentiary were released unharmed, said Capt. Washington Cavalcanti of the Goias police.

The inmates' flight was part of a deal, worked out with authorities during their six-day standoff, in which they received guns, cars and money in exchange for releasing some of the hostages.

Two police cruisers escorted the eight getaway cars out of the maximum-security prison at dusk, through a barricade of officers and sharpshooters.

On Thursday, state troopers and federal police in vans and three helicopters fanned out in and around Goias state, in Brazil's central region, said Cavalcanti.

Heavily armed troopers set up armored-car roadblocks on highways connecting Goias to the states of Minas Gerais, Sao Paulo, Mato Grosso and Tocantins, he said.

``It appears these elements have spread out around the country,'' said Cavalcanti by telephone from Goiania, the state capital. ``But we'll get every last one of them.''

Of the 40 inmates that fled, 30 were still at large, he said, while eight had been recaptured and two were killed in a shootout. One innocent bystander was killed during an exchange of gunfire.

Earlier, government negotiators had said 43 prisoners escaped, but Cavalcanti said that figure was incorrect.

The standoff began last week when inmates at the overcrowded prison in Aparecida de Goiania, 580 miles northwest of Rio, overpowered 27 officials and reporters during a tour of the facility, and took judges and police as captives.

They released nine of their hostages in exchange for food and water, and locked the others in a cell with canisters of cooking gas, which they threatened to explode if police invaded.

After getting the cars, guns and money, they promised to release all remaining hostages within 10 hours after taking flight if police did not pursue them.

Five of the getaway cars headed north on a highway toward Brasilia, police said, while three went south into Minas Gerais state.

Around midnight on Wednesday, two fugitives were shot to death during an attempted carjacking in the city of Porangatu in northern Goias, 250 miles north of the prison, said police Capt. Davi Dantas.

``The driver was an army lieutenant and had a gun under the seat. When they threw him in the back, he pulled it out and shot two of them,'' said Dantas.

The car crashed into a telephone pole, and four other fugitives in the car fled, leaving behind their hostage, Judge Fabio Cristovao de Faria, said Dantas.

Police captured the ringleader of the March 28 rebellion, Leonardo Pareja, after trading gunfire with him at a barricade at the border between Goias and Tocantins states.

Pareja demanded the presence of the regional judge and surrendered, releasing his hostage, Aldo Sabino, 25, son of the president of the Goias state superior court. But the other four fugitives in the car fled, said Cavalcanti.

A third car crashed into an armored vehicle at a roadblock near Luziana, about 160 miles from Goiania, police said. Two officers were wounded in the ensuing gun battle. All six fugitives in the car were arrested, and their hostage, Homero Sabino, Aldo's father, was freed.

Police also exchanged shots with the fugitives in another getaway car outside Brasilia, the capital, and a woman hit by a stray bullet was killed.

And a fifth car, carrying five fugitives, was apparently headed for the Bolivian border after releasing the last hostage at the airport in Cuiaba, Mato Grosso's capital.

``It's possible they made it, because the border controls in that area are very loose,'' said Cavalcanti.