text: Railways across the UK are currently overseen by British Transport Police.
  The Scottish government said it would be more efficient for these duties to be integrated into Scotland's national police force.
  Rail unions have spoken out against the move, while police chiefs have warned that a merger could be "massively complicated".
  However the senior police officers told MSPs at a Scottish parliament committee session in November that potential issues were "not insurmountable".
  Absorbing transport policing into Scotland's single force has been a long-running goal for Justice Secretary Michael Matheson.
  The BTP wanted to continue providing the service, but with oversight from Holyrood instead of Westminster after devolution, and three railway unions came out against the plan.
  As the Railway Policing (Scotland) Bill was tabled at Holyrood, Mr Matheson insisted it would "ensure railway policing has a strong future".
  The bill itself is just the first step in the integration process, aimed at conferring the extra policing powers on the Scottish Police Authority and the Police Service of Scotland.
  Further legislation will be needed both at Holyrood and Westminster to transfer staff, properties and cross-border policing functions.
  Mr Matheson said: "We have listened closely to the issues raised by the rail industry, policing services and unions and we have offered a triple-lock guarantee that secures jobs, pay and pension conditions through the course of integration.
  "We have been assured by Police Scotland that the specialist knowledge, skills and experience of BTP officers and staff will be protected and maintained within Scotland's wider policing service. As part of Police Scotland, railway policing will benefit from their local support, specialist resources and expertise.
  "Cross-border policing will continue to be seamless in both directions. Police Scotland has excellent relationships with their counterparts and we are working with the UK government to ensure police have appropriate powers for the entire duration of cross-border journeys."
  Assistant Chief Constable Bernard Higgins, of Police Scotland, said the force was "committed to working with" the government and other organisations to make sure the integration was "seamless".
  In November, Mr Higgins told MSPs on the justice committee that the move could be "massively complicated", but said the force would "respect the decision of parliament".
  He said: "It would be complicated, but not insurmountable. There would be massive transition issues, but operationally, we could police the rail network in Scotland."
  However, BTP Deputy Chief Constable Adrian Hanstock asked the committee: "If it's not broken, what are we trying to fix?"
  He added: "Why does BTP exist now if it's so easy to absorb it into a geographic force? There's a reason why the specialism is so valued by the industry and passengers - it hasn't just emerged out of a want from some enthusiasts. There's a real need for policing the railway in a different way."
  The meeting heard that staffing levels in railway policing would be "ring-fenced" after a merger, with officer numbers guaranteed in all but "times of crisis".
  However, Nigel Goodband from the BTP Federation said he could "guarantee" that the expertise of BTP would be "diluted", with some officers wanting to remain with the force elsewhere rather than move to Police Scotland and others choosing to retire. "Ultimately you will lose expertise," he said.
  Committee convener Margaret Mitchell, a Tory MSP, said it was "clear that there is not a consensus on what is a very complex issue".
  Her party has set itself in opposition to the bill, saying Police Scotland is "already loaded with problems from top to bottom".
  Justice spokesman Douglas Ross said: "The SNP's plans for the BTP don't have the support of those operating in the force just now and need to be reconsidered.
  "These plans to change BTP will leave people thinking that the SNP is determined to cut ties with anything that happens to include the name Britain."
  Scottish Labour also spoke out against the bill, saying the government should "respect the independence of British Transport Police".
  Justice spokeswoman Claire Baker said: "We already have a transport police system in Scotland that works and serves us well. Yet with this Bill, Scotland risks losing expertise whilst eroding the cross border nature of transport policing.
  "We should not be putting the transport police and local policing under further risk by continued police centralisation."
target: A bill has been tabled at Holyrood to have Police Scotland take over railway policing duties north of the border.