Gud, som haver barnen kär

"Gud, som haver barnen kär..." (Swedish for 'God, who holds the children dear') is an old prayer for children, of unknown origin. The prayer was first printed in 1780 in Barnabok, hans Kongl. höghet kronprinsen i underdånighet tilägnad af Samfundet Pro fide et Christianismo ('Children's book, humbly dedicated to his Royal Highness the Crown Prince by the Pro fide et Christianismo Society'), which was published on the occasion of the Swedish crown prince's (later Gustav IV Adolf) second birthday. In the book the prayer is called "En allmän bön för små barn" ('A general prayer for little children') and reads as follows:

It is likely based on an orally transmitted prayer. It was first printed as a hymn in the Salvation Army songbook of 1907. It was later published in the Swedish Sunday School hymnal (1908) where three additional verses were composted by Johan Bernhard Gauffin and Carl Boberg and eventually in the regular hymnal Nya psalmer 1921, the annex to the 1819 Swedish hymnal where Siri Dahlquist extended the prayer by five additional verses, of which the first one begins "Gode Fader, i din vård" ('Good father, in thy care').

The melody, according to Koralbok för Nya psalmer, 1921 was possibly composed in 1531, but in later editions the melody is attributed to Ivar Widéen in 1912. The prayer is also sometimes sung with the same melody as "Twinkle, twinkle, little star". The first printed version of the prayer was sung to the melody "Härlig är Guds himmel blå".