Theresa May waded into the row over the Scottish Government's controversial merger of British Transport Police (BTP) and Police Scotland, saying that "the number one priority must be the safety of the public".
The comments provoked angry exchanges at Prime Minister's Questions that earned SNP MPs a rebuke from the Commons speaker.
Merger plans have been put on hold amid growing concern about the plans, and a survey revealed on Wednesday that the vast majority of British Transport Police staff are opposed to the merger.
Mrs May was asked about the plans by Douglas Ross, the Conservative MP for Moray, who called on the Scottish Government to "look at all options for the future of BTP when it is devolved from this parliament... rather than the failed integration plans that are already struggling in Scotland".
The Prime Minister said the UK Government was "committed to delivering the Smith Commission in full" including powers over BTP, but said Scottish ministers should put public safety first.
READ MORE: Controversial rail policing merger is thrown into doubt
"It is a matter for the Scottish Government as to what they choose to do, but I urge them to ensure they are putting the safety and security of people who are travelling first when they make that decision," Mrs May added.
The SNP's David Linden was the next MP to be called, and started his question about Job Centre closures in Glasgow with a request to "ask the Prime Minister a question about a policy that she is responsible for".
Mrs May hit back, telling Mr Linden: "I have the right, as I did previously, to comment on issues that we are taking up with the Scottish Government."
Commons Speaker John Bercow then intervened, telling the Glasgow East MP: "I will be the judge of what is in order, and he will accept the ruling. The Prime Minister was in order, and that is again the end of it. Somebody has to decide, and I have done so."
Mr Bercow intervened to stop the Prime Minister answering another SNP MP, who asked about a Conservative fundraiser where meals with Ruth Davidson and Mrs May were auctioned off for tens of thousands of pounds.
Alan Brown, the MP for Kilmarnock, suggested the Conservatives were offering to "hire [Ms Davidson] out for £15,000 a day" at the recent Black and White Ball event.
Mr Brown went on: "At that same dinner, the Defence Secretary was on hire for £30,000, while £2,000 bought the International Trade Secretary and it was £55,000 for the Prime Minister. Does the Prime Minister agree that although her party will sell anything that moves, it is time to halt the privatisation of Tory MPs and they should get on with the day job?"
Mr Bercow asked the SNP MP for an assurance "that he is not suggesting that the presence of a member of parliament was bought. If he is suggesting that, it is straightforwardly out of order."
When Mr Brown replied that he was "referring to a story that was in the newspapers", Mr Bercow told him: "I am afraid that that is not good enough." The Prime Minister was told she did not have to answer, and Mrs May did not respond.