In April 1878, Gilbert and Sullivan toured the deck of H.M.S. Victory, taking copious notes and making drawings of everything from the riggings to the sailors' uniforms. The librettist and composer wanted the visual aspect of their new operetta, H.M.S. Pinafore, to be as accurate as possible. Gilbert even ordered the costumes from a naval supplier. Such attention to detail, and the procedures Gilbert used to create the scenery and rehearse the actors, would become typical of the team's working method from H.M.S. Pinafore on.
It was H.M.S. Pinafore, or The Lass that Loved a Sailor that established Gilbert and Sullivan as a creative force to be reckoned with in British comic theater. The operetta opened at the Opéra Comique Theatre in London on May 25, 1878. The first performance in the United States took place at the Boston Museum on November 25, 1878. This was pirated and modified from the British production. The vogue for H.M.S. Pinafore in the U.S. was unprecedented, and by March 1879, eight different theaters were running the operetta, while in Philadelphia another six houses staged the piece simultaneously; one of these was the first version translated into German. Producer Richard D'Oyly Carte brought the original, British version of H.M.S. Pinafore to New York in the summer of 1879. He felt the great success of pirated versions in the U.S. would prompt audiences there to attend the original production; plus, he was annoyed that he and the authors received no royalties for the American performances. Gilbert, too, was unhappy with the situation: "I will not have another libretto of mine produced if the Americans are going to steal it. It's not that I need the money so much, but it upsets my digestion." On December 1, 1879, the D'Oyly Carte production of H.M.S. Pinafore opened in New York to great acclaim.
Gilbert's libretto has everything necessary to create a comedy. The captain's daughter, Josephine, is being courted by two men, one a sailor (Ralph Rackstraw) and the other the Admiral of the British Navy (Sir Joseph Porter). To make things more complicated, a former nurse, Little Buttercup, exchanged two babies many years earlier.
Sullivan's music, however, was responsible for the long-term success of H.M.S. Pinafore. After a great first night, attendance dwindled drastically. In August, Sullivan assembled a few numbers from the show into a medley for a concert at Covent Garden that rekindled interest in the stage work. Eventually, H.M.S. Pinafore would run nearly 700 performances. Sullivan's melodies are what make the show memorable. From the opening sailors' chorus to Little Buttercup's simple aria, H.M.S. Pinafore abounds with unforgettable tunes. Sir Joseph's "When I Was Lad" is a patented Sullivan patter song that looks ahead to the Major-General's song in The Pirates of Penzance. In the stirring chorus, "A British Tar Is a Soaring Soul," we hear Handelian ornamental passages, and Sullivan parodies contemporary patriotic songs in "He is an Englishman." The most popular number from the show is the second-act Trio, "Never Mind the Why and Wherefore."
Gilbert's leading comic figure in H.M.S. Pinafore, Sir Joseph Porter, is based on Gilbert's contemporary, W.H. Smith, whom Disreali appointed First Lord of the Admiralty although Smith had never been on a ship. As Gilbert explained in 1908: "You would naturally think that the person who commanded the entire Navy would be the most accomplished sailor...but that is not the way in which such things are managed in England."