The ship Elise brought an organ to Reykjavík in the spring of 1840, the first that Dómkirkjan, the Cathedral of Reykjavík, had owned. It went up on the west gallery, so tall that a hole had to be cut in the ceiling for it.

Its organist was Pétur Guðjohnsen. Reykjavík had found the money to send him for three years to the teachers' college at Jonstrup, on Zealand, so that he could come back and take over its children's school. He learned singing and the organ there, and it was he who set the purchase of the organ going. He landed on 20 May 1840 and was the cathedral's organist until he died in 1877.

Before the organ came, services in Iceland had generally been sung without an instrument. A precentor began each hymn and the congregation followed. Magnús Stephensen, in the afterword to a hymnbook, complained of people bawling over one another, cutting in, dragging notes out longer than their neighbours, and singing so hard that the veins stood out on their faces.

Pétur changed it by teaching. At the Latin school he had the boys sing in parts, and from 1850 he also taught the students for the priesthood to sing from notes. He urged them to get harmoniums for their churches, and soon there were more of them. His Íslenzk sálmasöngs- og messubók, printed in Copenhagen in 1861, gave hymn tunes and music for the service in a single line and brought in a new chant for the liturgy. Older people missed the singing of the old Graduale. His sons published his hymnbook set for three voices in 1878, the year after he died. Among the few who learned the organ from him was Sveinbjörn Sveinbjörnsson.

Outside the church, the blacksmith Jónas Helgason and others who loved to sing founded a society in 1862, later named Harpa, which the cathedral's own history counts as the first organised choir in the country. Its concerts were among the town's chief pleasures.

Iceland held a festival in 1874 for the thousandth year since its settlement. The king ordered a service in every church, and the bishop chose the day, 2 August, and the text, the ninetieth psalm, in which a thousand years in God's sight are as yesterday. In the winter before it the poet Matthías Jochumsson stayed for a time in Edinburgh with Sveinbjörn, a friend from school who taught music there and was, the government's history says, the first Icelander to make music his profession. Matthías wrote the first verse of a hymn in Edinburgh and the other two in London. Sveinbjörn, Matthías wrote later, did not trust himself to set it. Matthías sent him one plea after another through the winter, and the tune came in the spring, barely in time to reach Iceland.

Lofsöngur, a hymn of praise that opens "Ó, guð vors lands" (Our country's God), was first sung by a mixed choir at the festival service in Dómkirkjan at half past ten on the morning of Sunday 2 August 1874. Christian IX was in the church, the first reigning king to visit the country. The words "Íslands þúsund ár", Iceland's thousand years, come round in each of its three verses. The same history says the hymn seems to have drawn little notice that day. Harpa sang everything at the festival that was not sung in church.

Singing societies sang it often in the last quarter of the century. In the years between home rule in 1904 and sovereignty in 1918 custom made it the national anthem, which it has been since 1 December 1918. Its tune ranges too wide for many people to sing, the government's page says, and usually the first verse is sung alone. Matthías's fair copy of the words and Sveinbjörn's of the score are in the manuscript collection of the National and University Library of Iceland.

Dómkirkjan stands beside the parliament house. It is the bishop's church, and Dómkórinn, its choir, sings the services there. The cathedral's own page begins the story of its music in 1840, with Pétur, the first Icelander trained as an organist.