IT is a famous inter-city rivalry that continues to keep Scotland's two largest cities poles apart.

Now an academic has claimed the grudge between the good people of Edinburgh and Glasgow was rooted more than 300 years ago – and started over a humble loaf of bread.

Professor Robert Crawford, of St Andrews University, believes he has traced the bickering back to concerns over the standards of baking in Glasgow in 1656.

Mr Crawford said: "The famous, often misunderstood, rivalry between Glasgow and Edinburgh began over 300 years ago. One of the first recorded flare-ups happened in 1656, when the town council of Glasgow expressed concern at the bad quality of bread the local bakers were producing.

"Two bakers from Edinburgh offered an easy solution and also managed to one-up Glasgow – they would happily bake Glaswegians bread that met higher quality, Edinburgh standards.

"The gloves were off and the jousting between Edinburgh and Glasgow had begun."

While Edinburgh and Glasgow are separated by only 45 miles, the rivalry permeates every aspect of life from business and culture to sport.

Glasgow is often seen as trendier, friendlier, wetter and more dangerous than Edinburgh, which in turn is considered prettier, more sophisticated and less colloquial.

Mr Crawford has claimed the rivalry is one of the first great city stand-offs of the English-speaking world. The author discovered the historic squabble while researching his new book On Glasgow and Edinburgh, the first of its kind exclusively devoted to both cities.

He said: "Competition between cities in a single country is a very ancient phenomenon, going back at least to Athens and Sparta in classical Greece.

"Yet in the English-speaking world the rivalry between Glasgow and Edinburgh is foundational in that it precedes and to some extent prefigures all other fully-developed, long-standing urban rivalries – those between New York and Boston, Sydney and Melbourne, Toronto and Vancouver come later.

"In England, London's overbalancing dominance has gone uncontested and the jousting between Oxford and Cambridge is essentially between universities.

"Within Scotland though, since at least the 17th century, a sense of sparring and sometimes outright competition between the country's two largest cities has been a defining aspect of the nation."

But he said his tome, which is launched next month, shows it is possible to love both cities equally.

He said: "It is in part the centuries old rivalry, the differences, the splendidly distinct flavoursomeness of these almost-but-never-quite neighbours that constitutes their enduring yet dynamic allure.

"In both cities there is the assumption that Glaswegians are rough diamonds whose hospitality, especially to those in need, is legendary.

"In Edinburgh, folk wisdom has it, at whatever time you arrive on someone's doorstep you may be welcomed with the words 'you'll have had your tea' – meaning the visitor will have already eaten and so the host will not need to provide any nourishment.

"Such caricatures are unfair, yet far too much fun to jettison.

"Only people from Edinburgh could dwell in a universe without Glaswegians; only Glaswegians could live on an Edinburgh-less planet. Everyone else may enjoy this pair of stubborn cities equally; no-one can understand Scotland without paying attention to both."

"It would be a terrible shame if this rivalry were ever settled."

On Glasgow and Edinburgh will be launched at Blackwells Bookshop in the capital on February 28 and in Glasgow at the Aye Write! Festival, which runs from April 12 to 20.