A hostage situation in a Beirut, Lebanon, bank ended on Thursday after authorities agreed to grant a Lebanese gunman partial access to his frozen funds in exchange for releasing all six hostages.

Bassam al-Sheikh Hussein, 42, entered the Federal Bank of Lebanon branch in the Hamra neighbourhood of west Beirut with a firearm just before noon on Thursday, a security source told Reuters.

“He demanded access to around $200,000 he had in his bank account. When the employee refused the request, he began screaming that his relatives were in the hospital. Then he pulled out the gun,” the source said.

The hostage situation ended after six hours when the bank agreed to give the man around $30,000, his sister and the head of a local banking association told local media. It was not immediately clear if the terms of the settlement included any criminal charges.

Some bank customers managed to flee before he shut the doors on the rest, said the source.

At least one elderly man was released from the bank because of his age and government negotiators were deployed to begin talks with the hostage taker, the interior ministry said.

The remaining six hostages comprised one customer and five bank employees, including bank manager Hassan Halawi, who spoke to Reuters by phone within the branch.

“I’m in my office. He (the hostage taker) gets agitated, then calms down, then gets agitated again,” Halawi said by phone before he was released.

Lebanese media station Al-Jadeed said at least two shots had been fired. The Lebanese Red Cross told Reuters they had deployed an ambulance to the scene.

During the hostage situation, a crowd gathered outside the bank, many of them chanting, “Down with the rule of the banks!”

Since Lebanon’s financial crisis took hold in 2019, Lebanese banks have limited withdrawals of hard currency for most depositors during the country’s three-year financial meltdown, which has left more than three-quarters of the population struggling.

Banks say they make exceptions for humanitarian cases including hospital care but depositors and their representatives have told Reuters those exemptions are rarely implemented.