While many believed Prince Harry’s military career was cushy and safe, the truth appears to be far different.

A senior Taliban leader has told Prince Harry that the militants he killed in Afghanistan were “not chess pieces, they were humans”.

Responding to revelations in Harry’s forthcoming memoir that he killed 25 Taliban fighters, Anas Haqqani, a senior aide to the interior minister, tweeted: “Mr Harry! The ones you killed were not chess pieces, they were humans; they had families who were waiting for their return.

“Among the killers of Afghans, not many have your decency to reveal their conscience and confess to their war crimes.”

Another Taliban official, Bilal Karimi, the deputy spokesman, said Harry’s admission showed that “such crimes were not limited to just anyone” and added that “every occupier has a history of such crimes.”

Harry writes about his two tours of duty in Afghanistan in his highly anticipated book, Spare, a copy of which Sky News obtained before its release next week.

In it, the prince reveals that he killed 25 fighters and says he did not think of them as “people”, but instead as “chess pieces” that had been taken off the board.

He adds: “It was not something that filled me with satisfaction, but I was not ashamed either.”

Shortly before Mr Haqqani tweeted, a former senior army officer told Sky News that Harry’s comments were “ill-judged” and could incite an attack on British soldiers.

Colonel Richard Kemp, who took command of British forces in Afghanistan in 2003 before his retirement, said the prince’s suggestion that British soldiers are trained to see their enemies as “less than human” was particularly dangerous.

He said Harry’s remarks “were probably ill-judged for two reasons. One is his suggestion that he killed 25 people will have reincited those people who wish him harm.”

Col Kemp, who retired in 2006, added: “The other problem I found with his comments was that he characterised the British Army basically as having trained him and other soldiers to see his enemy as less than human, just as chess pieces on a board to be swiped off, which is not the case. It’s the opposite of the case.”

He said it was these comments in particular that could “incite some people to attempt an attack on British soldiers anywhere in the world”.

Col Kemp also said people who support the Taliban may now be “motivated to kill Harry” because of memories that have been “resurrected” by his comments.

He added: “Let’s hope they don’t succeed and I’m sure he’s got pretty good security, but that’s one problem.”

Lord Darroch, a former national security adviser, said if he were guiding Prince Harry he would have “advised against the kind of detail that he goes into”.

“But it’s out there now,” he said.

“In terms of the detail I personally wouldn’t have gone there, but it’s done now.”

Harry’s book also includes an explosive claim he was physically attacked by his brother William during a row over his marriage to Meghan Markle.

He also writes about the moment he was woken up by his father to be told his mother had been in a car accident.

The duke also admits to having taken cocaine and says he asked his father not to marry Camilla.

In a new trailer for an interview with ITV to promote the book, the duke says he saw a “red mist” in William during an argument between them.

He claims his brother “wanted me to hit him back, but I chose not to”.