Two boys aged nine and 11 have been given a formal warning after they narrowly missed being struck by a high-speed train on a railway line in Edinburgh.

Officers have identified eight boys aged between six and 12 who were involved in a series of trespassing incidents at Wester Hailes station.

British Transport Police (BTP) said information on some of the youngsters was passed to the reporter to the Children's Panel while others were given formal warnings in front of their parents.

The service issued an alert in May after the narrow miss and other incidents in which young children were seen running across the railway line and jumping off platforms at the station.

Constable Niall Bonnar of BTP said: "Following extensive enquiries we were able to track down those who had been involved and attended their home addresses.

"Their parents expressed real shock when informed of the circumstances and have been extremely supportive in reinforcing the seriousness of the actions to the boys.

"The two boys who narrowly missed being struck by a high-speed train as it passed through the station were identified and following consultation with other agencies were each issued with an early and effective intervention formal warning."

BTP said an initiative aimed at reducing the number of trespassing incidents in the area had been "extremely effective".

Mr Bonnar added: "Before the schools broke up BTP officers visited the primary schools in the vicinity of Wester Hailes station and delivered rail safety presentations to around 1,200 pupils. These were well-received by pupils, teachers and parents alike.

"We also increased high-visibility patrols, particularly during the school summer holidays, and there were no more incidents of children trespassing during that period."

Patrols and monitoring will continue in the area to prevent incidents recurring, he said.