Even so, it remained unclear whether Mr. Monis had any accomplices.

The armed man took control of the Lindt Chocolate Cafe on Martin Place in central Sydney around 9:45 a.m. Monday, trapping employees and customers inside. He had a black flag with white Arabic script, similar to those used by Islamic militants on other continents, which was later displayed in a cafe window.

During the day Monday, five people fled the cafe, including two employees, but it was not clear whether the assailant had allowed them to leave or they had escaped.

Auto and rail traffic was halted and nearby buildings like the New South Wales Parliament and the Reserve Bank were evacuated or locked down, and helicopters circled overhead. Police officials said they made contact with the hostage-taker and tried to negotiate an end to the siege.

Mr. Monis was known to the police. According to The Sydney Morning Herald, he was free on bail in two separate criminal cases. He was charged in November 2013 with being an accessory before and after the fact in the murder of his ex-wife, Noleen Hayson Pal, and in April 2014, he was charged with the indecent and sexual assault of a woman in western Sydney in 2002. Forty more counts of indecent or sexual assault relating to six other women were later added in that case.

Mr. Monis pleaded guilty in 2013 to 12 charges related to the sending of poison-pen letters to the families of Australian servicemen who were killed overseas, local media reports said. He was reportedly sentenced to probation and community service.