ministry of Kirkintilloch on 19 Feb. 1653, but was charged by the English rulers ‘not to preach in that church, and the people not to hear him.’ The parishioners adhered to him nevertheless. In 1655 he was transferred to Linlithgow. There he met with further obstruction, but the synod declared him to be lawfully called and admitted. He joined the party of the resolutioners, and on 29 May 1661 celebrated the restoration of Charles II by publicly burning the Solemn League and Covenant and the acts of parliament passed during the civil wars (Grub, Eccles. Hist. of Scotland, iii. 244; Wodrow, Hist. of the Sufferings of the Church of Scotland, ii. 430). In 1664 he was appointed parson of Hamilton, to which office was annexed the deanery of Glasgow, and from 1665 to 1667 was rector of Glasgow University (Munimenta Universitatis Glasguensis, iii. 395–6). On 6 Jan. 1666, in that capacity, he headed the list of subscribers to the oath of allegiance to episcopacy (ib. p. 335). He used his influence to protect the Duke of Hamilton from injury at the skirmish of Pentland on 28 Nov. 1666. In 1669 he and Arthur Ross, parson of Glasgow, drew up an address to the king protesting against the recent indulgence granted to presbyterian ministers. The council summoned Ramsay and Ross before it, declared the address to be illegal, and ordered it to be suppressed (Wodrow, iii. 142–4; Burnet, i. 491–2; Robert Law, Memorialls, pp. 20–1; Grub, iii. 232).
Ramsay was on friendly terms with Gilbert Burnet and Bishop Leighton, with whose desire for a scheme of comprehension he sympathised. When Leighton was transferred in 1673 to the archiepiscopal see of Glasgow, Ramsay succeeded him as bishop of Dunblane. He held his first synod there on 30 Sept. of the same year (Reg. Syn. Dunbl.; Keith, Cat. p. 204). In the second year of his episcopacy he came into conflict with Sharp, archbishop of St. Andrews, whose arbitrary handling of the church had excited widespread discontent. The bishops of Brechin, Edinburgh, and Dunblane (Ramsay) formulated a demand for a national synod. When, however, in July 1674, Sharp called a meeting of the bishops in his own house to consider certain canons for the church, Ramsay alone ventured to insist on the need of ‘a national convocation of the clergy.’ He was not summoned to the second day's conference, and returned to his diocese, leaving behind a letter denouncing the proposed canons as inopportune, and not within the province of a private consultative meeting of the bishops.
The king, on 16 July 1674, in reply to the address of Ramsay and his friends, expressed ‘displeasure against all factious and divisive ways,’ and ordered Sharp to translate Ramsay to the see of the Isles. Ramsay, on receiving notice of the king's decision, petitioned the council (28 July) to present his case again to the king, and, despite Sharp's opposition, the petition was forwarded to Lauderdale. An angry correspondence between Sharp and Ramsay followed. Sharp inhibited Ramsay, and proceeded to London. Thither, in April 1675, Ramsay followed him (Wodrow, ii. 405; cf. Hist. MSS. Comm. 2nd Rep. p. 205). The quarrel was submitted to the consideration of several English bishops of both provinces in September 1675, with the result that Ramsay retained the see of Dunblane (Wodrow, ubi supra, ii. 303–40; Grub, iii. 249–52; Law, Memorialls, pp. 70–84; Life of Robert Blair, pp. 541–9; Burnet, Own Times, ii. 46–7).
During 1676 and 1677 Ramsay was engaged in a suit against Francis Kinloch of Gilmerton for an annuity due to him as dean of the chapel royal, annexed to his bishopric (Lauder, Historical Notice of Scottish Affairs, i. 105–9, Bannatyne Club). The case is of importance in the history of Scottish ecclesiastical revenues. In May 1684 he was transferred to the see of Ross (Keith, p. 283; Lauder, ii. 549). In 1686 he preached in the High Church, Edinburgh, before the members of parliament a sermon against the act for the toleration of Roman catholicism. As a consequence he was called before the archbishop of St. Andrews and the bishop of Edinburgh to answer a charge of defaming the archbishop and his brother Melfort. ‘This staging of the bishop of Ross was one of the various methods employed to get the act for toleration of Popery to pass’ (Lauder, Historical Notice, ii. 726). On 3 Nov. 1688, however, Ramsay signed the letter of the Scottish bishops to James, congratulating him on the birth of a son, and expressing amazement at the news of an invasion from Holland (Wodrow, App. ii. p. cxlvii).
On the abolition of episcopacy Ramsay was expelled from office, and died at Edinburgh, in great poverty, on 22 Oct. 1696. He was interred in the Canongate churchyard. He married Mary Gartstair, and had eight sons and three daughters. His eldest son, Robert, was minister of Prestonpans.
[Hew Scott's Fasti Eccl. Scot. pt. i. p. 161, pt. iii. pp. 75, 259, pt. iv. p. 840, pt. v. p. 455; Keith's Historical Cat. of Scottish Bishops, pp. 183, 204; Hist. MSS. Comm. 2nd Rep. p. 205; Munimenta Universitatis Glasguensis, iii. passim; Wodrow's Hist. of the Sufferings of the Church of Scotland, ubi supra; Grub's Eccles. Hist. of