PARIS (Reuters) - A French policeman was shot dead and two others were wounded in central Paris on Thursday night in an attack carried out days before presidential elections and quickly claimed by the Islamic State militant group.

President Francois Hollande said he was convinced the “cowardly killing” on the Champs Elysees boulevard, in which the assailant was himself shot dead by police, was an act of terrorism.

The wide avenue that leads away from the Arc de Triomphe had been crowded with Parisians and tourists enjoying a spring evening, but police quickly cleared the area, which remained empty well into the night of all but heavily armed security forces and police vehicles.

Paris Prosecutor Francois Molins said the man had been identified, but investigators were still assessing if he had accomplices.

A police arrest warrant issued earlier on Thursday, which was seen by Reuters after the attack, warned of a dangerous individual who had come into France by train from Belgium on Thursday. It was unclear if that man was the attacker or linked to the shooting.

Officers searched the home of the dead attacker in a town east of Paris, a police source said.

“The sense of duty of our policemen tonight averted a massacre ... they prevented a bloodbath on the Champs Elysees,” Interior Minister Matthias Fekl told reporters.

“A little after 9 PM a vehicle stopped alongside a police car which was parked. Immediately a man got out and fired on the police vehicle, mortally wounding a police officer,” Interior Ministry spokesman Pierre-Henry Brandet said.

France has lived under a state of emergency since 2015 and has suffered a spate of Islamist militant attacks mostly perpetrated by young men who grew up in France and Belgium and that have killed more than 230 people in the past two years.

Witness Chelloug, a kitchen assistant, told Reuters he was walking out of a shop and saw a man get out of a car and open fire with a rifle on a policeman.

“The policeman fell down. I heard six shots, I was afraid. I have a two year-old girl and I thought I was going to die... He shot straight at the police officer.”

The Islamic State group, which is being driven out of its areas of territorial control in Iraq and Syria by Western-backed coalitions and has hundreds of French-speaking fighters, claimed responsibility for Thursday’s shooting via its Amaq news agency, naming the attacker as Abu Yousif al-Belgiki.

The claim came quickly and the naming of the assailant suggested a degree of direct contact with Islamic State. The group also claimed responsibility for a car attack in London last month killing four, but gave no name or details.

Slideshow ( 17 images )

Police sources said the man was known to intelligence services. French television networks reported that he was a 39-year-old French national known for previous violent crimes.

POLICE CLEAR THE AREA

Police authorities called on the public to avoid the area.

Slideshow ( 17 images )

The Arc de Triomphe monument and the top half of the Champs Elysees were packed with police vans, lights flashing and heavily armed police shutting the area down after what was described by one journalist as a major exchange of fire.

The incident came as French voters prepared go to the polls on Sunday in the most tightly-contested presidential election in decades.

“We shall be of the utmost vigilance, especially in relation to the election,” said President Hollande, who is not himself running for re-election.

Earlier this week, two men were arrested in Marseille who police said had been planning an attack ahead of the election.

A machine gun, two hand guns and three kilos of TATP explosive were among the weapons found at a flat in the southern city along with Islamic State propaganda materials, according to Molins.

That incident brought issues of security and immigration back to the forefront of the campaign, with the anti-immigration National Front leader Marine Le Pen repeating her call for Europe’s partly open borders to be closed.

On Thursday, speaking after a television appearance, she said she was “deeply angry” as well as sad for the police victims “because not everything is done ... to protect our compatriots. They need more than our compassion.”

Candidates in the election said they had been warned about the Marseille attackers. Francois Fillon, who is the conservative candidate, said he would cancel the campaign events he had been planning for Friday.

He also called for campaigning generally to be suspended, although from midnight on Friday the law says it has to stop anyway. Far left candidate Jean-Luc Melenchon said campaigning should continue.

In November, 2015, Paris was rocked by near simultaneous gun-and-bomb attacks on entertainment sites, in which 130 people died and 368 were wounded. Islamic State claimed responsibility. Two of the 10 known perpetrators were Belgian citizens and three others were French.