The devolution of the policing of the railways was a recommendation of the Smith Commission report in the wake of the result of the Independence Referendum in 2014.
The report offered three routes to devolution of rail policing to Scotland. The Scottish Government chose to pursue the route of abolition of the current 'D Division' of BTP, which is the Scottish division, and the taking over of its responsibilities by Police Scotland - Option 3 in the report.
It is well worth reading the report in full.
As a supporter of Scottish Independence, having read the report I can only think that the government's choosing of Option 3 is based on an emotional response rather than a reasoned one. Whilst I like the idea that everything done in Scotland is under Scottish control, the policing of the railways appears to be an exception. At the very least there must always be a separate body, dedicated to policing the railways, for reasons clearly explained in the report. Whether this body can, or should, be run entirely separately from the rest of the BTP would be for detailed discussion. Difficulties associated with cross-border trains may be insurmountable.
I was delighted with the news that the implementation has been indefinitely postponed until a workable solution can be found. As a much-respected colleague put it recently, "The warm arms (mixed metaphor alert) of the long grass beckon".