Hannah tells the story of Hannah and of her devotion to God which resulted in her being blessed with fertility by God. It was the first of two oratorio librettos written by Smart, the second being Abimelech.
Smart defined an oratorio as:
"a sacred opera; deducing its fable from scripture, as the opera itself does, from profane history. This species (if righly executed) is most admirably calculated to fulfill the great end of drama, to make men more virtuous; as it takes for its subject the actions of holy men, and consequently deals much in praises and addresses to the deity. I believe our oratorios at present in vogue, tho' not very remarkable for poetical composition, have their good effect on the more rational and sober part of the audience. Yet what more universal and useful effects would this species of the drama produce, if it was to join true poetry, with true piety, and the sacred characters introduced, were taught to speak from the head as well as the heart? Add to this, a regularity of plan might be maintained (which hitherto has been utterly neglected) as well as in any other dramatic piece. In short, no subject more naturally affords the true sublime, than that of which the oratorio consists; and consequently, an exalted genius can no where find a more suitable or ample field, for the exercise and exertion of his most magnificent conceptions.
In order to help produce his first oratorio, Smart turned to John Worgan to compose the score. Smart previous worked with Worgan when Worgan composed the score for Smart's Solemn Dirge, a poem written on the death of Frederic Prince of Wales. After the two finished, they advertised in the Public Advertiser on 21 February 1764 that Hannah would run three days at the end of March. The show was supposed to be performed on 30 March and 31 March, but it was cancelled because it was Lent and they were unable to find singers. Eventually, Hannah was performed for only one night, 3 April 1764.
Hannah was supposed to run a second night and sold tickets, but the show was unable to be performed. An advertisement in the Public Advertiser on 1 May 1764 read:
"The Favourable RECEPTION of the ORATORIO of HANNAH, found from the Nobility and Gentry who honoured it with their Presence at this Theatre, had determined the Author to perform it again according to his first Intention, After the Passion Week (as no Night could be found before that Time, on which many of the principle Performers were not otherwise engaged) but on Account of the advanced Season, and that several who had taken their Tickets have left the Town for the Summer, he is advised by his Friends to defer the Performance until next Winter. As several are desirous of knowing when the Songs in this Oratorio will be published, the Author takes this Opportunity of Acquainting the Public, that they are now Printing, and will be ready for Sale in a few Weeks of which Notice will be given in this Paper."However, there are no records of Hannah being performed during the following winter.
The libretto was published by Tonson April 1764 with the score printed later that year. The text of the libretto is written in copperplate by a professional copyist and a note on the final page says, "This Oratorio is intended to be perform'd at the Kings Theatre in the Haymarket with the Permission of the Lord Chamberlain. Dr. Worgan for Mr Giardini [missing] the said Theatre."
The libretto begins with an "argument" that gives a summary of the story of Hannah who, through her devotion to God, was allowed to give birth to Samuel. Immediately following, there is a disclaimer that reads:
"The only Liberty Mr. Smart has taken with the sacred Story is that he has introduced the Song of Hannah as a Thanksgiving immediate upon her Accceptance in Shiloh, whereas it was not composed till after the Birth of Samuel. This Liberty he humbly hopes is more pardonable than the total Omission of so pious and beautiful a Piece.However, rearranging the timing of biblical events was not the only liberty taken with the story; the libretto emphasizes Peninnah's fertility and jealousy along with Elkanah's benevolent treatment of Hannah.
The oratorio begins with Peninnah singing:
The character of Peninnah uses her fertility as an excuse to mock Hannah in a manner more "earthly" than sacred. The earthly mannerisms of Peninnah and her maids were emphasized in the oratorio for "theatrical effect". However, the themes of fertility and barrenness are also important aspects for Smart's poetic theme. The Handmaid to Peninnah emphasizes these themes when she sings: