French police were preparing to storm an apartment building in Toulouse on Wednesday if a gunman suspected in seven killings and claiming allegiance to al-Qaeda doesn’t surrender, a top police official said.

Cedric Delage, regional secretary for a police union, said the suspect has promised to turn himself into police shortly. Mr. Delage says if that doesn’t happen, police will force their way in to arrest him.

The suspect told police he belonged to al-Qaeda and wanted to take revenge for Palestinian children killed in West Asia, Interior Minister Claude Gueant said, adding the man also said he was angry about French military intervention abroad.

The gunman is suspected of killing three Jewish children, a rabbi and three French paratroopers in recent days.

An Interior Ministry official identified the suspect as Mohamed or Mohammad Merah, who has been under surveillance for years for having “fundamentalist” views. The official spoke on condition of anonymity because the investigation is ongoing.

After hours of trying to persuade him to surrender, police evacuated the five-storey building, escorting residents out using the roof and fire truck ladders.

The raid was part of France’s biggest manhunt since a wave of terrorist attacks in the 1990s by Algerian extremists. The chase began after France’s worst-ever school shooting on Monday and last week’s attacks on paratroopers, a series of killings that have horrified the country and frozen the campaigning for presidential elections starting next month.

French authorities have been following several leads but said the man holed up in the Toulouse apartment building is their key suspect. The suspect threw a Colt .45 handgun used in each of the three attacks out a window in exchange for a device to talk to authorities, but has more weapons like an AK-47 assault rifle, authorities said. Mr. Gueant said other weapons had been found in the suspect’s car.

There was some confusion over the suspect’s background, because a person of the same name was arrested in southern Afghanistan five years ago and escaped from his prison cell in Kandahar province in a 2008 mass jailbreak, according to Kandahar provincial spokesman Ahmad Jawed Faisal. However, Faisal says their records also show that Merah was an Afghan citizen from Kandahar province.

Police swept in soon after 3 a.m. (7.30 a.m. IST) on the residential neighbourhood in Toulouse where the suspect was holed up. At one point, volleys of gunfire were exchanged. An elite squad was handling the negotiations.

The raid was part of a manhunt for a shooter who has killed seven people, including French soldiers and Jewish school children, in three attacks in the Toulouse area. In Monday’s attack, the three young children and a rabbi were killed.

The suspect promised several times to surrender in the afternoon, then stopped talking to negotiators, Mr. Gueant said. In the early afternoon, he resumed talking, a police official said.

More In: International | News