Mary Hamilton
"Mary Hamilton", or "The Fower Maries" ("The Four Marys"), is a common name for a well-known sixteenth-century ballad from Scotland based on an apparently fictional incident about a lady-in-waiting to a Queen of Scotland. It is Child Ballad 173 and Roud 79.
In all versions of the song, Mary Hamilton is a personal attendant to the Queen of Scots, but precisely which queen is not specified. She becomes pregnant by the Queen's husband, the King of Scots, which results in the birth of a baby. Mary kills the infant – in some versions by casting it out to sea or drowning, and in others by exposure. The crime is seen and she is convicted. The ballad recounts Mary's thoughts about her life and her impending death in a first-person narrative.
Versions of the ballad have been recorded by a number of artists, including Joan Baez, The Corries, and Angelo Branduardi.

Sources of the ballad
Most versions of the song are set in Edinburgh (Scotland's traditional capital), but Joan Baez set her version, possibly the best known, in Glasgow, ending with these words:

Last night there were four Maries;
Tonight there'll be but three:
There was Mary Beaton and Mary Seton
And Mary Carmichael and me.This verse suggests Mary Hamilton was one of the famous Four Maries, four girls named Mary who were chosen by the queen mother and regent Mary of Guise to be companion ladies-in-waiting to her daughter, the child monarch Mary, Queen of Scots. However their names were Mary Seton, Mary Beaton, Mary Fleming and Mary Livingston.
Mary Stuart could not be a real life source for the ballad in any of its current forms as these are in conflict with the historical record. She and the Four Maries lived in France from 1547 to 1560, where Mary was dauphine and then queen as the wife of King Francis II. Mary later returned home to Scotland (keeping the French spelling of her surname, Stuart). She married her second husband, Henry Stuart, Lord Darnley in July 1565, and he was murdered 20 months later, when he was king of Scots and joint ruler with Mary. So there was not much time for Darnley to have got one of the four Maries (or any other mistress) pregnant, and there is no record of him having done so. Also the song refers to "the highest Stuart of all" – which between 1542 and 1567 was a woman not a man.The ballad could contain echoes of James IV or James V,  who both had several illegitimate children, but none of their mistresses were executed or tried to dispose of a baby.
In many versions of the song, the queen is called "the auld Queen". This would normally indicate a Queen Dowager or Queen Mother, but in this context suggests a queen consort who was an older woman, and married to a king of comparable age. If the reference is limited to Queens named Mary, another candidate would be Mary of Guelders (1434–1463), queen to James II, King of Scots.

Mary Hamilton in Russia
The story may have been transferred from a wholly different context. It has been noted that it most closely matches, rather than any event in Scotland, the legend of Maria Danilova Gamentova, daughter of an expatriate branch of the Clan Hamilton established in Russia by Thomas Hamilton during the reign of Tsar Ivan IV (1547–1584). A lady in waiting to Tsarina Catherine, second wife of Tsar Peter I "The Great" (who later succeeded him as Catherine I), Mary Hamilton was also the Tsar's mistress.  She bore a child in 1717, who may have been fathered by the Tsar but whom she admitted drowning shortly after its birth. She also stole trinkets from the Tsarina to present them to her lover Ivan Orlov. For the murder of her child, she was beheaded in 1719.Mary's head was preserved and displayed in the Kunstkamera, a palace holding natural and scientific "curiosities". At that time, Charles Wogan was in Russia on a mission for James Francis Edward Stuart, and through him news of the incident might have reached Scotland.

Field Recordings
Dozens of traditional versions of the ballad have been recorded. James Madison Carpenter recorded several versions in Scotland in the early 1930s, which can be heard online via the Vaughan Williams Memorial Library. Peter Kennedy recorded two Scottish versions in the mid-1950s, sung by Jeannie Robertson of Aberdeen and Ethel Findlater of Dounby, Orkney, and another version sung by Mary Taylor of Saxby-All-Saints, Lincolnshire, England. Fred Hamer recorded Fred Jordan of Ludlow, Shropshire singing 'The Four Marys' in 1966.The song made its way to the United States, where Alan Lomax recorded Texas Gladden of Virginia singing a version in 1941, and traditional singer Almeda Riddle of Arkansas performed a version in 1972. Jean Ritchie and her sister Edna were filmed in their hometown of Viper, Kentucky performing a rendition passed down through their family. Many versions have also been found in Canada, including several recorded by Helen Creighton in Nova Scotia, New Brunswick and Ontario.

"Mary Hamilton" in A Room of One's Own
In her highly influential text A Room of One's Own, author Virginia Woolf alludes to the characters in the ballad. She refers by name to Mary Beton, Mary Seton, and Mary Carmichael as recurrent personae, leaving only Mary Hamilton, the narrator of the ballad, unmentioned. Mary Beton plays the prominent role in Woolf's extended essay, as she serves as the speaker.
According to her narrator in A Room of One's Own, "'I' is only a convenient term for somebody who has no real being." A few sentences later, the narrator returns to the concept of identity and subjectivity and invokes the subjects of the ballad for the first time: "Here then was I (call me Mary Beton, Mary Seton, Mary Carmichael or by any name you please – it is not a matter of importance)..."Mary Beton serves as the narrator throughout A Room of One's Own. The six chapters of the essay follow Mary Beton's walks through Oxbridge grounds and London streets, and her mental explorations of the history of women and fiction. The name reappears in the character of the narrator's aunt, who serves as both the namesake and benefactor of Mary Beton. Woolf is able to detach herself from the narrative voice of the essay through the use of Beton.
Mary Seton is a friend of Mary Beton at the fictitious Fernham College (modelled after Cambridge's Newnham and Girton Colleges). It is partially through her conversations with Seton that Beton raises questions about the relationship between financial wealth and the opportunities for female education. Speaking of Mary Seton's mother, the narrator states, "If she had left two or three hundred thousand pounds to Fernham, we could have been sitting at our ease tonight and the subject of our talk might have been archaeology, botany, anthropology, physics, the nature of the atom, mathematics, astronomy, relativity, geography."Mary Carmichael plays the role of a fictitious author referenced by the narrator in A Room of One's Own.  Her fabricated novel, Life's Adventure, allows Woolf to introduce the concept of female relationships. Mary Carmichael may also evoke the idea of the real author and birth-control activist Marie Carmichael (pseudonym for Marie Stopes) and her novel Love's Creation.

Lyrics
Mary Hamilton (The Fower Maries)Yest're'en the Queen had fower Maries
The nicht she'll hae but three
There was Mary Seton and Mary Beaton,
And Mary Car-Michael and me.
Oh little did my mother think
The day she cradled me
The lands I was to travel in
The death I was tae dieOh tie a napkin roon my eyen
No let me seen to die
And sent me a'wa tae my dear mother
Who's far away o'er the sea
But I wish I could lie in our ain kirkyard
Beneath yon old oak tree
Where we pulled the rowans and strung the gowans
My brothers and sisters and me
Yest're'en the Queen had fower Maries
The nicht she'll hae but three
There was Mary Seton and Mary Beaton,
And Mary Car-Michael and me.
But why should I fear a nameless grave
When I've hopes for eternity
And I'll pray that the faith o' a dying thief.
Be given through grace tae me
Yest're'en the Queen had fower Maries
The nicht she'll hae but three
There was Mary Seton and Mary Beaton,
And Mary Car-Michael and me.
There was Mary Seton and Mary Beaton,
And Mary Car-Michael and me.
——————————
Notes to the lyrics:

References
External links
Mary Hamilton in several variants