Ankara (AFP) - A policeman was stabbed to death in Istanbul on Sunday by a suspected member of the Islamic State group who had been arrested for planning a suicide attack, Turkish media said.

The assailant stabbed the officer at around 11 pm (2000 GMT) as he was being taken out of a patrol car near a police station following his arrest, according to the privately run Dogan news service.

The attacker, who was detained on suspicion of planning to carry out a suicide bombing, was then shot dead by police, the pro-government Anadolu agency reported.

The officer, who was taken from the scene in an ambulance, died from his wounds.

It was not immediately clear how the man managed to keep a knife while being taken into custody.

Turkey was hit in 2016 by a succession of attacks that left hundreds dead in the bloodiest year of terror strikes in its history.

The attacks were blamed on IS jihadists who had taken swathes of territory in neighbouring Syria and Iraq as well as the outlawed Kurdistan Workers Party (PKK) who have battled the Turkish state in an insurgency lasting more than three decades.

Last month anti-terror officers in Istanbul detained dozens of alleged IS members, several of whom were said to be preparing a "sensational attack" in Turkey, police said.

An attack by a jihadist gunman on an elite nightclub in Istanbul just 75 minutes into New Year's Day in 2017 left 39 people dead, mainly foreigners.

There has since been a lull in similar attacks, but tensions and high security remain in big cities.