Robert Cochrane (possibly died 1482) is said to have been an architect or mason who lived in the reign of King James III of Scotland and who became a royal favourite. His influence over the king is said to have incurred the wrath of the aristocracy, culminating in a coup in which he was killed.
There exists a good deal of controversy about the accuracy of the received story of his influence on the king, linked to broader issues about the reign of James III. These issues concern the theme of a king taking advice from low-born favourites rather than from established noble councillors.
The traditional view is that James was a cultured man in the context of his time, but otherwise had some serious character flaws, a weak king and a dilettante who surrounded himself with a group of talented but low-born favourites. Cochrane was the most important of these favourites. He is said to have designed the Great Hall at Stirling Castle, and perhaps that at Falkland. To some extent he governed the country during the 1470s. He is said to have advised the king to debase the coinage in order to raise cash. He was opposed by the king's younger brothers, Alexander Stewart, 1st Duke of Albany and John Stewart, Earl of Mar. Mar was arrested and imprisoned, dying shortly thereafter; Albany escaped and gathered support in England. The king is said to have given Cochrane the title of Earl of Mar after his brother's death, though no record of this survives.
Cochrane's downfall came during an invasion by an English army led by the king's younger brother, the Duke of Albany, and the Duke of Gloucester, the future King Richard III of England. Albany had promised to give part of Scotland to England in exchange for being placed on the throne. A cabal of aristocrats, led by Archibald Douglas, 5th Earl of Angus, decided that they must get rid of Cochrane and the other favourites in order to secure the Scottish crown. Angus chose to "bell the cat", as he put it. Cochrane and the king's other favourites were with the king's army at Lauder Bridge when a group of nobles refused to continue south to meet the enemy. Angus led the way by arresting Cochrane. The group then detained the king himself and hanged all the favourites from a bridge.
In the late 20th century much of this came to be questioned. Some historians have been more sympathetic to James III, seeing him as a cultured man in the relatively crude atmosphere of the Scottish nobility at that time, and defended him against some criticisms. The leading Scottish historian Norman Macdougall published a revisionist biography of James III in which he argues that, far from being a weak king, he was actually something of a tyrant. Macdougall dismissed the "favourites of low birth" as the invention of chroniclers in the next century whose knowledge of the facts was poor. He argues that all we can say for sure is that James had some dealings with an architect or mason called Cochrane, and the rest is later invention. Macdougall found two records of a Thomas Cochrane; one reference suggests that Cochrane was an usher of the king's chamber door, and the other that a Thomas Cochrane had forfeited the lands of Cousland near Dalkeith. Cochrane of Cousland, Macdougall concludes, may have been the usher and met his end at Lauder Bridge. Macdougall also follows the development of the story in later writers and points particularly to William Drummond of Hawthornden's History of the 5 Jameses for setting the final elaboration of the story. Macdougall argues that Hawthornden increased the status of Cochrane to that of an architect in order to rescue the king's reputation.
This view is not universally accepted by historians. This pattern of events, a royal favourite being assassinated by jealous nobles, occurred several times in late mediaeval and early modern Europe.