A gunman who took four people hostage in a bank in Toulouse has been captured and his captives released unharmed.

Police said the man was slightly injured in the operation to capture him.

The announcement came soon after a series of gunshots were heard from the area of the bank.

Authorities say the gunman had psychiatric problems in the past and claimed he was acting for religious reasons.

Some reports said he claimed allegiance to al Qaeda.

The man took the hostages, who included the bank manager, in a branch of French bank CIC around mid-morning and fired a shot after an attempted armed robbery apparently went wrong.

The standoff was the latest drama to hit Toulouse since a young al Qaeda-inspired gunman shot dead three soldiers, a rabbi and three Jewish children in March. The hostage-taker asked for the elite RAID commando unit to come to the scene – the same squad that shot dead gunman Mohammed Merah in March after a long standoff just metres from the site of yesterday's siege.