Grieg wrote it for Ibsen's play Peer Gynt (1876). Despite the title, the sun is rising over the Moroccan desert, not a Norwegian fjord.