An Sylvia, D. 891; Op. 106, No. 4, is a Lied composed by Romantic era composer Franz Schubert in 1826 and published in 1828. The text of the lied is a German translation of the poem, "Who is Sylvia", from Act 4, Scene 2 of the play, The Two Gentlemen of Verona, by William Shakespeare. The text was translated into German from English by Eduard von Bauernfeld, and the song is scored for voice and piano. An Sylvia was composed during a peak point in Schubert's career around the time he was writing the Ninth Symphony "Great" (D 944) just two years before his death.
Although considered to be myth, it is said that Schubert first came up with the idea to write An Sylvia as he was walking in Vienna and entered a beer garden with friends. There, he found a volume of Shakespeare on a table and as he was reading, he apparently exclaimed, "Oh! I have such a pretty melody running in my head. If only I had some paper!" His friend drew staves on the back of a menu, and, as it came to his head, Schubert spontaneously wrote melodies to the words he was reading in the play.
The handwritten score was originally entitled "Gesang" and appeared within a small booklet labeled "Wahring, July 1826" (Wahring was a town outside of Vienna where Schubert stayed with his friend Franz von Schober). The score had no tempo markings and served as Schubert's only draft of "An Sylvia" which allowed him to write additional notes in the score over time as ideas came to him. In addition, the title "Gesang" was crossed out and instead "An Sylvia" was written in its place.An Sylvia became one of three Shakespeare texts set to music by Schubert; the other two are Ständchen ('Hark, hark! the lark') and Trinklied.
Schubert's friend, Franz von Schober, held on to the original manuscript and managed Schubert's music after the composer's death. After the Lithographic Institute of Vienna published An Sylvia in 1828, Schober published it himself shortly after. Later on, in 1829, An Sylvia was assigned "op. 106" after Anton Diabelli published the work.