Police in France on Wednesday were closing in on a gunman suspected of killing seven people, including three schoolchildren, and surrounded an apartment complex in Toulouse where the man had barricaded himself. 

Officers were trying to negotiate with Mohammed Merah, a 24-year-old French national of Algerian heritage who has claimed links to al Qaeda, authorities said. The standoff followed an early-morning raid that turned into a firefight in which three officers were wounded, an Interior Ministry official was quoted as saying. At least two of the policemen were hurt when the suspect shot at the door. 

Merah was believed to be armed with semiautomatic weapons and a number of handguns, according to news reports. Negotiations with police were said to have stalled.

He is suspected in the killings of three Jewish schoolchildren, a rabbi and three French soldiers in Toulouse, southern France. The children and the rabbi were shot to death Monday.

After hours of trying to persuade Merah to surrender, police evacuated the five-story building, escorting residents out by the roof and firetruck ladders.

The suspect told police he belonged to al Qaeda and wanted to avenge the deaths of Palestinian children, Interior Minister Claude Gueant was quoted as saying. The suspect also reportedly said he was angry about French military intervention abroad, and had spent time in Afghanistan and Pakistan.

Merah threw a handgun out a window in exchange for a communications device, but he had more weapons, authorities said.

According to Gueant, Merah had been under surveillance by French secret police for years after travelling to Pakistan and Afghanistan to train with Islamic extremists.

In 2007 he was arrested and sentenced to three years in prison for planting bombs in Afghanistan's Kandahar province, before escaping in a Taliban-sponsored jail break in 2008, French Daily Le Monde reported.

Merah's mother, who is Algerian, was at the scene but didn't take part involved in the negotiations, French media reported. One of the man's brothers was arrested and a second brother went to a police station, according to reports.