The British warship H.M.S. Pinafore is at anchor off Portsmouth.
The sailors are on the quarterdeck, proudly "cleaning brasswork, splicing rope, etc."

Little Buttercup, a Portsmouth "bumboat woman" (dockside vendor) – who is the "rosiest, roundest, and reddest beauty in all Spithead" – comes on board to sell her wares to the crew.
She hints that she may be hiding a dark secret under her "gay and frivolous exterior".
Ralph Rackstraw, "the smartest lad in all the fleet", enters, declaring his love for the Captain's daughter, Josephine.
His fellow sailors (excepting Dick Deadeye, the grim and ugly realist of the crew) offer their sympathies, but they can give Ralph little hope that his love will ever be returned.

The gentlemanly and popular Captain Corcoran greets his "gallant crew" and compliments them on their politeness, saying that he returns the favour by never ("well, hardly ever") using bad language, such as "a big, big D".
After the sailors leave, the Captain confesses to Little Buttercup that Josephine is reluctant to consider a marriage proposal from Sir Joseph Porter, the First Lord of the Admiralty.
Buttercup says that she knows how it feels to love in vain.
As she leaves, the Captain remarks that she is "a plump and pleasing person".
Josephine enters and reveals to her father that she loves a humble sailor in his crew, but she assures him that she is a dutiful daughter and will never reveal her love to this sailor.

Sir Joseph comes on board, accompanied by his "admiring crowd of sisters, cousins and aunts".
He recounts how he rose from humble beginnings to be "ruler of the Queen's Navee" through persistence, although he has no naval qualifications.
He then delivers a humiliating lesson in etiquette, telling the Captain that he must always say "if you please" after giving an order; for "A British sailor is any man's equal" – excepting Sir Joseph's.
Sir Joseph has composed a song to illustrate that point, and he gives a copy of it to Ralph.
Shortly afterwards, elated by Sir Joseph's views on equality, Ralph decides that he will declare his love to Josephine.
This delights his shipmates, except Dick Deadeye, who contends that "when people have to obey other people's orders, equality's out of the question".
Shocked by his words, the other sailors force Dick to listen to Sir Joseph's song before they exit, leaving Ralph alone on deck.
Josephine now enters, and Ralph confesses his love in terms surprisingly eloquent for a "common sailor".
Josephine is touched, but although she has found Sir Joseph's attentions nauseating, she knows that it is her duty to marry Sir Joseph instead of Ralph.
Disguising her true feelings, she "haughtily rejects" Ralph's "proffered love".

Ralph summons his shipmates (Sir Joseph's female relatives also arrive) and tells them that he is bent on suicide.
The crew expresses sympathy, except for Dick, who provides a stark counterpoint of dissent.
Ralph puts a pistol to his head, but as he is about to pull the trigger, Josephine enters, admitting that she loves him after all.
Ralph and Josephine plan to sneak ashore to elope that night.
Dick Deadeye warns them to "forbear, nor carry out the scheme", but the joyous ship's company ignores him.
The British warship H.M.S. Pinafore is at anchor off Portsmouth. The sailors are on the quarterdeck, proudly "cleaning brasswork, splicing rope, etc."
Little Buttercup, a Portsmouth "bumboat woman" (dockside vendor) – who is the "rosiest, roundest, and reddest beauty in all Spithead" – comes on board to sell her wares to the crew. She hints that she may be hiding a dark secret under her "gay and frivolous exterior". Ralph Rackstraw, "the smartest lad in all the fleet", enters, declaring his love for the Captain's daughter, Josephine. His fellow sailors (excepting Dick Deadeye, the grim and ugly realist of the crew) offer their sympathies, but they can give Ralph little hope that his love will ever be returned.
The gentlemanly and popular Captain Corcoran greets his "gallant crew" and compliments them on their politeness, saying that he returns the favour by never ("well, hardly ever") using bad language, such as "a big, big D". After the sailors leave, the Captain confesses to Little Buttercup that Josephine is reluctant to consider a marriage proposal from Sir Joseph Porter, the First Lord of the Admiralty. Buttercup says that she knows how it feels to love in vain. As she leaves, the Captain remarks that she is "a plump and pleasing person". Josephine enters and reveals to her father that she loves a humble sailor in his crew, but she assures him that she is a dutiful daughter and will never reveal her love to this sailor.
Sir Joseph comes on board, accompanied by his "admiring crowd of sisters, cousins and aunts". He recounts how he rose from humble beginnings to be "ruler of the Queen's Navee" through persistence, although he has no naval qualifications. He then delivers a humiliating lesson in etiquette, telling the Captain that he must always say "if you please" after giving an order; for "A British sailor is any man's equal" – excepting Sir Joseph's. Sir Joseph has composed a song to illustrate that point, and he gives a copy of it to Ralph. Shortly afterwards, elated by Sir Joseph's views on equality, Ralph decides that he will declare his love to Josephine. This delights his shipmates, except Dick Deadeye, who contends that "when people have to obey other people's orders, equality's out of the question". Shocked by his words, the other sailors force Dick to listen to Sir Joseph's song before they exit, leaving Ralph alone on deck. Josephine now enters, and Ralph confesses his love in terms surprisingly eloquent for a "common sailor". Josephine is touched, but although she has found Sir Joseph's attentions nauseating, she knows that it is her duty to marry Sir Joseph instead of Ralph. Disguising her true feelings, she "haughtily rejects" Ralph's "proffered love".
Ralph summons his shipmates (Sir Joseph's female relatives also arrive) and tells them that he is bent on suicide. The crew expresses sympathy, except for Dick, who provides a stark counterpoint of dissent. Ralph puts a pistol to his head, but as he is about to pull the trigger, Josephine enters, admitting that she loves him after all. Ralph and Josephine plan to sneak ashore to elope that night. Dick Deadeye warns them to "forbear, nor carry out the scheme", but the joyous ship's company ignores him.
H.M.S. Pinafore