RIO DE JANEIRO — Brazilian police fatally shot a suspected drug trafficker Monday who had stunned Rio de Janeiro by pulling off a violent escape from a hospital three months ago.

A police statement said 28-year-old Nicolas Labre Pereira and two other unidentified men were killed while exchanging gunfire with a special force in a mangrove forest outside the city.

Pereira escaped from custody at a downtown hospital June 19 after nearly 20 gunmen stormed the building. A patient was killed, and a nurse and an off-duty policeman were wounded.

The hospital was one of those recommended for any tourists needing medical care, and the incident raised concerns about security less than two months before the Olympic Games kicked off in Rio.

More than 10 people were killed in shootouts caused by the subsequent hunt for Pereira.