A police officer has been stabbed outside a railway station in east London in an incident that a senior official has claimed is the latest example of an epidemic of “senseless acts of violence” against officers.

The British Transport police (BTP) said the male officer was approached by a suspect outside Ilford station at about 9.45pm on Friday night and attacked with a knife before colleagues managed to restrain and arrest the suspect.

The officer was taken to hospital for treatment for his injuries, which are not thought to be life-threatening.

Witnesses described seeing the bloodied officer outside the station as it was put on “complete lockdown”, while footage shared on social media showed a man being restrained on the floor as more officers arrived.

Local people said there had been a large police presence outside the station throughout the past week, including on Friday afternoon, with officers on horseback patrolling the area – which one said was “a hotbed for drug dealers”.

Scotland Yard said one person had been arrested for drug possession outside the station on Friday evening.

Nigel Goodband, the BTP federation chairman, said: “I wouldn’t like to have imagined what could have happened if those colleagues weren’t in close proximity. It’s shocking – knife crime and the wider epidemic of attacking police officers is a real concern to us all.

“We’re witnessing this too often now: it seems certain elements of society see it as acceptable to attack police officers. We are now seeing senseless acts of violence against those who are there to protect society.”

A 24-year-old man arrested at the scene has been charged with attempted murder and will appear before magistrates on Monday, BTP said on Saturday.

The incident comes amid a rise in violent crime across London.

After a recent incident where an officer was kicked into a road, close to the path of a bus, the Metropolitan police federation chairman, Ken Marsh, called for officers to be given greater support.