All hostages held by a gunman at a synagogue in Texas have been freed after a standoff that ended in the death of their captor.

A rescue team breached the synagogue in Colleyville and freed three of the four people who were taken hostage, the city’s police chief Michael Miller said in a televised news briefing. One was released earlier.

The gunman took a rabbi and three members of Congregation Beth Israel hostage during a livestreamed Facebook service at the synagogue in the Dallas area Saturday morning. He was heard demanding the release of Pakistani neuroscientist Aafia Siddiqui, who is in a Texas federal prison, the Associated Press reported, citing officials it didn’t identify.