a troop when recalled in 1641 to compete for a regency (as a tutorship or professorship was then called) in the university of Glasgow. , He was elected in March. Mathematics, logic, ethics and politics were the chief subjects of his lectures, and a notebook on logic by one of his students has been pre- served. His activity and skill in matters of college business were praised by his colleagues, who numbered amongst them some of the leading Covenanting divines, and his zeal in teaching was gratefully acknowledged by his students. After nearly seven years' service he resigned his regency, and removed to Edinburgh, where he was admitted to the bar on the 17th of February 1648. This step had probably been rendered easier by his marriage, four years before, to Margaret Ross, co-heiress of Balneil in Wigtown. Stair's practice at the bar does not appear to have been large; his talents lay rather in the direction of learning and business than of oratory or advocacy. His reputation and the confidence reposed in him were shown by his appointment in 1649 as secretary to the commission sent to the Hague to treat with Charles II. by the parliament of Scot- land. The negotiation having been broken off through the unwillingness of the young king to accept the terms of the Covenanters, Stair was again sent in the following year to Breda, where the failure of Montrose's expedition forced Charles to change his attitude and to return to Scotland as the covenanted king. Stair had preceded him, and met him on his landing in Aberdeenshire, probably carrying with him the news of the execution of Montrose, which he had witnessed.
During the Commonwealth Stair continued to practise at the bar; but like most of his brethren he refused in 1654 to take the oath of allegiance to the Commonwealth. Three years later, on the death of Lord Balcomie, Stair was appointed one of the commissioners for the administration of justice in Scotland, on the recommendation of Monk. His appointment to the bench on the ist of July 1657, by Monk, was confirmed by Cromwell on the 26th. Stair's association with the English judges at this time must have enlarged his acquaintance with English law, as his travels had extended his knowledge of the civil law and the modern European systems which followed it. He thus acquired a singular advantage when he came to write on law, regarding it from a cosmopolitan, or international, rather than a merely local or national point of view. His actual discharge of judicial duty at this time was short, for after the death of Cromwell the courts in Scotland were shut — a new commission issued in 1660 not having taken effect, it being uncertain in whose name the commission ought to run. It was during this period that Stair became intimate with Monk, who is said to have been advised by him when he left Scotland to call a full and free parliament. Soon after the Restora- tion Stair went to London, where he was received with favour by Charles, knighted, and included in the new nomination of judges in the court of session on the 13th of February 1661. He was also put on various important commissions, busied himself with local arid agricultural affairs, and, like most of the Scottish judges of this and the following century, acted with zest and credit the part of a good country gentleman.
In 1662 he was one of the judges who refused to take the declaration that the national covenant and the solemn league and covenant were unlawful oaths, and, forestalling the deposition which had been threatened as the penalty of continued non-compliance, he placed his resignation in the king's hands. The king, however, summoned him to London, and allowed him to take the declaration under an implied reservation. The next five years of Stair's life were comparatively uneventful, but in 1669 a family calamity, the exact facts of which will probably never be ascertained, overtook him. His daughter Janet, who had been betrothed to Lord Rutherfurd, was married to Dunbar of Baldoon, and some tragic incident occurred on the wedding night, from the effects of which she never recovered. As the traditions vary on the central fact, whether it was the bride who stabbed her husband, or the husband who stabbed the bride, no credence can be given to the mass of superstitions and spiteful slander which surrounded it, principally levelled at Lady Stair. In 1670 Stair served as one of the Scottish commissioners who went to London to treat of the Union; but the project, not seriously pressed by Charles and his ministers, broke down through a claim on the part of the Scots to what was deemed an excessive representation in the British parliament. In January 1671 Stair was appointed president of the court of session. In the following year, and again in 1673, he was returned to parliament for Wigtownshire, and took part in the important legislation of those years in the department of private law. During the bad time of Lauderdale's government Stair used his influence in the privy council and with Lauderdale to mitigate the severity of the orders passed against ecclesiastical offenders, but for the most part he abstained from attending a board whose policy he could not approve. In 1679 he went to London to defend the court against charges of partiality and injustice which had been made against it, and was thanked by his brethren for his success. When, in the following year, the duke of York came to Scotland Stair distinguished himself by a bold speech, in which he congratulated the duke on his coming amongst a nation which was entirely Protestant. This speech can have been little relished, and the duke was henceforth his implacable enemy. His influence prevented Stair from being made chancellor in 1681, on the death of the duke of Rothes.
The parliament of this year, in which Stair again sat, was memorable for two statutes, one in private and the other in public law. The former, relating to the testing of deeds, was drawn by Stair, and is sometimes called by his name. The other was the infamous Test Act, probably the worst of the many measures devised at this period with the object of fettering the conscience by oaths. Stair also had a minor share in the form which this law finally took, but it was confined to the insertion of a definition of " the Protestant religion "; by this he hoped to make the test harmless, but his expectation was disappointed. Yet, self-contradictory and absurd as it was, the Test Act was at once rigidly enforced. Argyll, who declared he took it only in so far as it was consistent with itself and the Protestant religion, was tried and condemned for treason and narrowly saved his life by escaping from Edinburgh Castle the day before that fixed for his execution. Stair, dreading a similar fate, went to London to seek a personal interview with the king, who had more than once befriended him, perhaps remembering his services in Holland; but the duke of York intercepted his access to the royal ear, and when he returned to Scotland he found a new commission of judges issued, from which his name was omitted. He retired to his wife's estate in Galloway, and occupied himself with preparing for the press his great work, The Institutions of the Law of Scotland, which he published in the autumn of 1681, with a dedication to the king.
He was not, however, allowed to pursue his legal studies in peaceful retirement. His wife was charged with attending conventicles, his factor and tenants severely fined, and he was himself not safe from prosecution at any moment. A fierce dispute arose between Claverhouse and Stair's son, John, master of Stair, relative to the regality of Glenluce; and, both having appealed to the privy council, Claverhouse, as might have been expected, was absolved from all the charges brought against him and the master was deprived of the regality. Stair had still powerful friends, but his opponents were more powerful, and he received advice to quit the country. He repaired to Holland in October 1684, and took up his residence, along with his wife and some of his younger children, at Leiden. While there he published the Decisions of the Court of Session between 1666 and 1671, of which he had kept a daily record, and a small treatise on natural philosophy, entitled Physiologia nova experimentalis.
In his absence a prosecution for treason was raised against
- Sir Walter Scott took the plot of his Bride of Lammermoor from this incident, but he disclaimed any intention of making Sir William Ashton a portrait of Lord Stair.