Special police units from the GIPN (Groupe d'intervention de la police nationale) arrived from Marseille and Bordeaux.

No officers from Raid - which has its headquarters north of Paris, about 600km (400 miles) from Toulouse - were deployed to the scene.

A police union source told the regional newspaper Ouest-France it was not clear whether the man's claim about al-Qaeda was "serious or a fantasy".

More than four hours into the siege, police said a woman hostage had been freed in exchange for food and water. A second woman was released some time afterwards.

Public prosecutor Michel Valet told reporters that the man "wishes to let it be known that he is not acting for money, but for religious reasons".

The hostage-taker was believed to be around 30 years old and known to the authorities, Toulouse newspaper La Depeche reported. He was from Castres, to the east of Toulouse, and one source told the paper he was a schizophrenic who had broken off his treatment.

His sister, who was brought to the scene during the afternoon to help in negotiations, revealed that her brother was not religious and had been in and out of social care since childhood.

After almost seven hours, the siege came to an end. The BBC's Hugh Schofield in Paris said that three explosions had been heard, possibly stun grenades, shortly before news emerged of the gunman's arrest.

The gunman had come out of the building with one of the two hostages, reportedly threatening him with a gun, prompting the special police unit to launch its assault.

He was shot in the thigh, La Depeche reported, before being arrested. He was then taken to hospital.

Merah siege

The bank in which the drama unfolded is a few hundred metres from Mohamed Merah's flat, in an area adjacent to the barracks where Raid police were based during the March siege that ended in his death.

All four hostages at the CIC branch in Toulouse were said to be bank employees

Merah, a 23-year-old Frenchman of Algerian descent, killed seven people in three separate attacks before he was shot dead by police. His victims included three children and a teacher at a Jewish school, and three soldiers.

Merah filmed his attacks and sent the footage to police.

He was shot dead by a police sniper on 22 March after commandos stormed his flat.

Merah was suspected to have had an accomplice within the Muslim community, our correspondent says.

In the wake of the shootings, the French authorities set up an investigation into whether Merah had accomplices and into possible Islamist indoctrination practices in prisons.

They have shown zero tolerance to anyone known to have used Islamist internet sites or to have had links to a fringe al-Qaeda group to which Merah is said to have belonged, our correspondent says.

On 7 June, a man armed with a shotgun took hostage a security guard at the French weather service, Meteo France. The hostage-taker fired several shots and was seriously injured when police returned fire.

Setih Boumeza, 26, who has a history of mental illness, entered the CIC bank branch in central Toulouse, fired one shot and took four people hostage.

He claimed he was member of al-Qaeda, was armed with explosives and demanded to negotiate with France's RAID commando unit – the same squad that shot dead 23-year-old Merah in March after a 32-hour stand-off at his home, five minutes' walk from the bank in the Côte Pavée district...

...Boumeza's sister, who was at the scene, said: "My brother is a practising Muslim but he's not a fundamentalist."

She added that he was "put in a foster home when he was little and suffers from rage and fears the outside world".

Boumeza's brother-in-law said: "He didn't have the childhood he had wanted. He wanted to pull a stunt. It was a cry for help."