Image copyright Getty Images Image caption Mr Miliband's comments came during a lunch with journalists in Edinburgh

Ed Miliband has said a Labour government at Westminster would consider building border posts if Scotland voted for independence.

The Labour leader said he "would have to look at the issue of a border" if the Scottish government achieved its goal of a looser immigration policy.

His comments came during a lunch with journalists in Edinburgh.

Analysis What does Ed Miliband mean by power to the people? Today in Edinburgh, the Labour leader made great play of his plan to "reform the British state". "When power is kept away from people, their voices are not heard," he declared. You might think this would mean a Prime Minister Miliband would stop Scottish MPs voting on English-only matters such as health and education, an anomaly known as the West Lothian Question. Not so, said Mr Miliband, over lunch with Scottish journalists. Labour had "no plans to create two classes of members of parliament" he told me, and no English voter had ever raised the issue with him. But with the UK constitution already looking rather lop-sided and Mr Miliband hoping to devolve further powers to Edinburgh, the sleeping English voters might yet waken in a bad mood. Mr Miliband had some time to ponder the matter this afternoon, as he left Edinburgh on Labour's red "Indyref Express" bus, bound for, you've guessed it, West Lothian.

Scottish ministers said border checks between an independent Scotland and the rest of the UK would not be necessary.

Earlier, the Labour leader urged voters in Scotland to reject independence, ahead of the 18 September referendum.

During the lunch, Mr Miliband said: "I think it's certainly the case that we would have to look at the issue of a border if you have different immigration policies.

"It totally stands to reason. If you have markedly different immigration policies, obviously that becomes an issue between Scotland and the rest of the UK."

Scottish First Minister Alex Salmond has suggested Scotland would need to encourage immigration to help redress the balance between working people and pensioners.

A Scottish government spokesman said: "An independent Scotland will continue to be a member of the current Common Travel Area with the rest of the UK, Republic of Ireland, the Isle of Man and the Channel Islands, so there will be no need for border checks between an independent Scotland and the rest of the UK.

"The Common Travel Area already allows for different and independent immigration policies within it.

"And this flexibility in the Common Travel Area will enable us to implement our own design for a controlled and more flexible immigration system."