Kezia Dugdale should be replaced as Scottish Labour leader and the party should back a second independence referendum, an ally of Jeremy Corbyn has said.

Former BBC and Channel 4 journalist Paul Mason suggested Scottish Labour endorse the position of deputy leader Alex Rowley for a more federal "home rule" arrangement for Scotland within the UK.

Writing for the New Statesman, Mason said if Labour did not "get real about Scotland" it risked losing Glasgow City Council in next year's local elections.

It comes after the SNP claimed a seat in the the Garscadden and Scotstounhill ward earlier this month, when Labour first preference votes fell 23% on the previous election.

Mason's article, called How the Left Should Respond to Brexit, painted the UK's decision to leave the EU as both an opportunity and challenge for the Labour party.

He wrote: "Labour needs to get real about Scotland. The recent loss of the council by-election in Garscadden and Scotstounhill, with a 20% swing to the SNP, signals that the party risks losing Glasgow City Council next year.

"It is a problem beyond Corbyn's control: his key supporters inside Scottish Labour are long-standing and principled left-wing opponents of nationalism.

"Which would be fine if tens of thousands of left-wing social democrats were not enthused by a new, radical cultural narrative of national identity."

Mason added: "Corbyn's natural allies - the thousands of leftists who took part in the Radical Independence Campaign - are trapped outside the party, sitting inside the Scottish Greens, Rise or the left of the SNP.

"The interim solution is for Scottish Labour to adopt the position argued by its deputy leader, Alex Rowley: embrace 'home rule' - a rejigged devo-max proposal - and support a second independence referendum. Then throw open the doors to radical left-wing supporters of independence.

"If, for that to happen, there has to be a change of leadership (replacing Kezia Dugdale), then it's better to do it before losing your last bastion in local government."

The journalist and author is a prominent backer of Labour leader Jeremy Corbyn but last week The Sun revealed he had told a friend he did not think Corbyn appealed to working class voters.

Mason is heard in an audio recording of the private lunch meeting saying shadow defence secretary Clive Lewis could "eventually" replace the Labour leader.

A source close to Kezia Dugdale said: "We all know that Paul Mason says one thing in public and another thing in private.

"Once again, it appears he is incredibly confused here. Paul rightly talks of the Tories' 'economic recklessness', but in the same breath refers to the Nationalists as 'progressive'. This is an incoherent argument.

"There is nothing progressive about the SNP, which seeks to further harm our economy by breaking away from our biggest trading partner."

The source added: "Under the SNP, Tory austerity is not only being passed on in Scotland, it is being doubled - with cuts of 11% to local authority budgets.

"Independence would lead to further austerity, as even some senior SNP figures have finally admitted.

"That is why there will be no support for a second independence referendum from Scottish Labour."