In 1679 the King's commissioner in Scotland was replaced by James, Duke of Monmouth, illegitimate son of Charles II, who was responsible for some the harshest treatment of the Covenanters. A year later the job was given to James, Duke of York, the younger brother of Charles II. Although his service in Scotland is said to have been creditable he had embraced Roman Catholicism in 1668 with a fervour that is typical of the convert. Charles II did so as well for French gold but kept it secret. James had married Anne Hyde, a commoner in 1662 (just a month before the birth of his daughter and future queen, Mary). In 1673 he remarried the devout Catholic, Mary of Modena. This and other actions taken by the brothers led the English Parliament to pass the Test Act of 1681 which denied public office to anyone not an Anglican.
Charles died without legitimate progeny in 1685 and was succeeded by his brother as James VII of Scotland and II of England. However, his ascension increased the concern on the part of Protestants including his nephew, the Duke of Monmouth who led a rebellion against him in 1685. This action was defeated and Monmouth was executed. The concern of Protestants was allayed somewhat in the knowledge that his daughter, Mary had married her Protestant cousin, Prince William of Orange at age 15 and that his other daughter, Anne had married Protestant Prince George of Denmark. Thus, the protestant succession seemed to be assured. However, in June 1688, Queen Mary gave birth to a son, James Francis Edward, later known as the 'Old Pretender.' This event caused great consternation among the Protestants who cheered when his son-in-law, William of Orange landed in November at Torbay with a substantial force including the Scots Brigade commanded by General Hugh Mackay of Scourie. Of course, this action had been solicited by a series of leading politicians. As William marched toward London, he was hailed everywhere as a deliverer while James was deserted by his ministers and troops and even his daughter, Anne.
King James' response is puzzling. He sent his queen and infant son to France at the first sign of trouble and then he himself fled there where he was welcomed by Louis XIV who settled a small pension on him. The revolution seemed to have succeeded without significant bloodshed. That would soon change with the initiation of the Jacobite wars that would plague Britain for the next fifty years. Note: the term Jacobite comes from the Latin word for 'James' -- Jacobus.