It is thought that Burns wrote this in about 1790, while he was having a passionate affair with Anna Park, a barmaid at the Globe Inn in Dumfries. Anna gave birth to his daughter in 1791.