The building began as a fortified Romanesque round house, to which a porch, a rectangular chancel and a westward nave were later added, along with a sacristy and two separate burial chapels. The chancel dates from the 13th century and was vaulted around 1300, the same period as the vaulting of the round house and the nave; the nave was further extended westward in the 15th century, when the porch and sacristy were also built. The distinctive domed lantern tower that dominates the exterior was funded by Queen Ulrika Eleonora following a fire in 1723.
Inside, the church holds medieval wall paintings from around 1440 attributed to Albertus Pictor, one of Sweden's best-known church painters, along with wooden sculptures depicting St Martin. These decorations were uncovered during a major restoration in 1928 led by the architect Erik Fant, having previously been concealed.
Much of the church's furnishing dates from the patronage of Magnus Gabriel de la Gardie in the 17th century. A finely carved west portal, originally made for Karlberg Palace in 1637, was moved to the church during repairs in 1673–74 and remains one of its more striking architectural features. The more classical brick burial chapels, with their rendered surfaces and rusticated corners, contrast with the rougher grey stone masonry of the original round church.
The church has had a succession of organs. An early instrument was donated in 1667 and later rebuilt at Queen Ulrika Eleonora's expense; a pneumatic organ built in 1892–93 was said to have been the first of its type in the Stockholm area. The current organ was built in 1991 by Walter Thür Orgelbyggen, replacing several 20th-century instruments.