Built in 1124, with the fine Romanesque doorway and chancel arch still visible, although much disguised by later extensions. The north aisle was added in 1631. The church remains in regular use.
Outside the gate there is a 'loupin-on-stane' to help riders mount their horses (17th Century) and the 'jougs', a punishment collar used to publicly detain transgressors.
A famous former minister was the Rev. John Thomson (1778 - 1840) who gave rise to the expression "we're all Jock Tamson's bairns". The writer Sir Walter Scott (1771 - 1832) was an elder of the Kirk under Thomson's ministry, and wrote part of 'Heart of Midlothian' in the manse garden. Another visitor to the manse was the painter J.M.W. Turner (1775 - 1851).