Lawyer. Educated at the University of Glasgow, where he later taught, James Dalrymple became the foremost lawyer of his time. He served as a judge under Oliver Cromwell and King Charles II becoming Lord President of the Court of Session (1671). After a period of self-imposed exile following the Test Act (1681), which had been proposed by King James VII (while Duke of York) to ensure royal supremacy over the church, Dalrymple returned to the bench after the 'Glorious Revolution'. He replaced the murdered Sir George Lockhart to become Lord President for the second time (1689) and was created Viscount Stair (1690), Stair being the family seat in Ayrshire. As father of John Dalrymple (1648 - 1707) and David Dalrymple (d. 1721), he gave rise to a noted legal dynasty.