His collaborations with the composer Jerry Bock also included “Fiorello!” — which, like “Fiddler,” was a Tony winner — and “She Loves Me.”Sheldon Harnick, the lyricist who teamed up with the composer Jerry Bock to write some of Broadway’s most memorable musicals, including the Tony Award winners “Fiddler on the Roof” and “Fiorello!,” died on Friday at his home in Manhattan. He was 99. His death was announced by a spokesman, Sean Katz.Mr. Harnick’s lyrics could be broadly funny, slyly satirical, lushly romantic or poignantly moving. He gave voice to a broad range of characters, including starry-eyed young lovers, corrupt politicians, a quarreling Adam and Eve and, in “Fiddler on the Roof,” struggling Jews in early-20th-century Russia.When three unmarried sisters in “Fiddler” confront the village matchmaker, two of them hopeful and the third cynical, they all end up having second thoughts:Matchmaker, matchmaker, plan me no plansI’m in no rush, maybe I’ve learnedPlaying with matches a girl can get burned.So bring me no ring, groom me no groom,Find me no find, catch me no catch.Unless he’s a matchless match!When the leading man in “She Loves Me” is about to meet the woman with whom he’s been trading love letters for months, he practically sings himself into a nervous breakdown:I haven’t slept a wink, I only thinkOf our approaching tête-à-tête,Tonight at eight.I feel a combination of depression and elation;What a state!To waitTill eight.Maria Karnilova and Zero Mostel in the original Broadway production of “Fiddler on the Roof,” for which Mr. Harnick and Jerry Bock wrote the score. The show, which opened in 1964, ran for more than 3,200 performances and became the longest-running musical in Broadway history.Bettmann/Getty ImagesMr. Harnick met Mr. Bock in the late 1950s, and the two quickly realized they could work together despite their different temperaments. “I tend to approach things skeptically and pessimistically,” Mr. Harnick told The New York Times in 1990. “Jerry Bock is a bubbling, ebullient personality.”The team would break up after a dozen years over a dispute involving their musical “The Rothschilds.” But the combination worked extremely well while it lasted.The late 1950s was a challenging time for newcomers to the musical stage. The decade’s hit Broadway musicals had included “Guys and Dolls,” “The King and I,” “Wonderful Town,” “My Fair Lady” and “Candide.” “In those days,” Mr. Harnick recalled in a 2004 interview, “lyricists were consciously trying to be more sophisticated and literate. Now we’re in the Andrew Lloyd Webber vein, trying to hit bigger, broader audiences.”Mr. Harnick and Mr. Bock got off to a weak start in 1958 with “The Body Beautiful,” set in the world of prizefighting; it closed after a brief run. But they bounced back decisively the next year with “Fiorello!,” a breezy portrait of one of New York City’s most colorful politicians.“Fiorello!,” which had a book by George Abbott and Jerome Weidman and was directed by Mr. Abbott, starred Tom Bosley as Fiorello H. La Guardia, the reformer who was mayor of New York from 1934 to 1945. Its score evoked a time when political corruption was rife.The song “Little Tin Box,” for example, suggests how a crooked party boss (Howard Da Silva) might have responded when a judge asked him how he has managed to buy a yacht, given his modest salary. The boss replies:I am positive Your Honor must be joking.Any working man can do what I have done.For a month or two I simply gave up smokingAnd I put my extra pennies one by oneInto a little tin boxA little tin boxThat a little tin key unlocks.There is nothing unorthodoxAbout a little tin box.“Fiorello!” ran for nearly 800 performances and won three Tony Awards, including the prize for best musical, which it shared with “The Sound of Music.” It was also one of the few musicals to win the Pulitzer Prize for drama.Jerry Bock, left, with Mr. Harnick in 1970. Their collaboration produced some of Broadway’s most memorable musicals.Barton Silverman/The New York TimesBut the Bock-Harnick team’s biggest success — and one of Broadway’s — was yet to come: “Fiddler on the Roof,” which opened in 1964 and ran for more than 3,200 performances. It became the longest-running musical in Broadway history, a record that stood for a decade.Directed and choreographed by Jerome Robbins, with a book by Joseph Stein based on the stories of Sholem Aleichem, “Fiddler on the Roof” told the story of a Jewish community facing expulsion from a village in the czarist Russian empire, with a focus on Tevye (Zero Mostel), the village milkman, and his family.In addition to “Matchmaker, Matchmaker,” the score included a number of songs that would soon be regarded as classics, including “Tradition,” “Sunrise, Sunset” and Tevye’s humorously wistful lament “If I Were a Rich Man” (“There would be one long staircase just going up/ And one even longer coming down/ And one more leading nowhere, just for show”).“Fiddler on the Roof” was more than a hit show; it was a phenomenon. It won nine Tony Awards, including one for its score. It was made into a hit movie in 1971, has been performed all over the world, and has had five Broadway revivals, most recently in 2015. (A Yiddish-language production was an Off Broadway hit in 2019 and played a return engagement in late 2022.)Mr. Harnick, left, and Hal Prince, the producer of “Fiddler on the Roof,” in 2015.Damon Winter/The New York TimesAmong the Bock-Harnick team’s other noteworthy efforts was “She Loves Me” (1963), based on the same Hungarian play that was the basis for the movies “The Shop Around the Corner,” “In the Good Old Summertime” and “You’ve Got Mail.” The story of two workers at a perfume shop in Budapest (Barbara Cook and Daniel Massey) who finally realize that they have been trading romantic letters and that they are meant for each other, “She Loves Me” had no showstopping songs and was not initially a big success, closing after 301 performances. But it has grown in popularity after a series of revivals — although Broadway productions in 1993 and 2016 were equally brief.Their other shows included “The Apple Tree” (1966), three musical playlets (including one about Adam and Eve) directed by Mike Nichols, and “The Rothschilds” (1970), based on Frederic Morton’s biography of the Jewish family that rose from the ghetto to become a financial powerhouse.It was a dispute over who would direct “The Rothschilds” that ended the Bock-Harnick partnership. The show’s original director, Derek Goldby, was replaced by Michael Kidd at the urging of Mr. Harnick and others who wanted someone with more musical-theater experience. Mr. Bock was irate.“Jerry felt that Derek had gotten a raw deal,” Mr. Harnick recalled in 1990. “For a while, the feelings between us were very bad.” He added that “things changed for the better” when “Fiorello!” was revived in 1985 at the Goodspeed Opera House in Connecticut and he and Mr. Bock met there to work on it. (It was revived again off Broadway in 2016.)Nonetheless, they never wrote another show together. Mr. Bock died at 81 in 2010.From left, Mr. Prince, Mr. Bock, Mr. Harnick, Fred Ebb and John Kander in 2004, when the Bock-Harnick and Kander-Ebb songwriting teams announced that they were giving their archives to the New York Public Library for the Performing Arts.Yoni Brook/The New York TimesSheldon Mayer Harnick was born on April 30, 1924, in Chicago to Harry and Esther Harnick. His father was a dentist, his mother a homemaker. He took violin lessons as a child, attended music school as a teenager and earned money playing in amateur theatricals. After serving in the Army, he enrolled at the Northwestern University School of Music. He graduated in 1949.He began writing songs while in Carl Schurz High School in Chicago and became seriously interested in songwriting as a career after hearing a recording of Burton Lane and E.Y. Harburg’s hit 1947 musical, “Finian’s Rainbow.” At the urging of the actress Charlotte Rae, a fellow Northwestern student, he moved to New York in 1950.Mr. Harnick’s first song in a Broadway show was “The Boston Beguine,” which he wrote — music as well as lyrics — for the revue “Leonard Sillman’s New Faces of 1952.” He wrote numbers for several other revues, including “Two’s Company” (1952), before teaming with Mr. Bock. (One of his compositions from those years, the darkly satirical and deceptively cheerful “The Merry Minuet,” was popularized by the folk music group the Kingston Trio.)Mr. Harnick’s first marriage, to Mary Boatner, was annulled. His second, to the comedian, writer and director Elaine May, ended in divorce. In 1965, he married Margery Gray, an actress whom he had met when she auditioned for his show “Tenderloin.” (She later became a photographer and an artist.) She survives him, as do a daughter, Beth Dorn; a son, Matthew Harnick; and four grandchildren.After his split with Mr. Bock, Mr. Harnick went on to collaborate with other composers. He worked with Mary Rodgers on a 1973 version of “Pinocchio” performed by the Bil Baird marionettes, and with her father, Richard Rodgers, on “Rex,” a musical about King Henry VIII of England that had a brief Broadway run in 1976, with Nicol Williamson in the title role. He also worked with Michel Legrand on two shows: an English-language stage version of the movie musical “The Umbrellas of Cherbourg,” produced off Broadway in 1979, and a new adaptation of “A Christmas Carol,” staged in Stamford, Conn., in 1982. And he collaborated with Joe Raposo on “A Wonderful Life,” based on the movie “It’s a Wonderful Life,” which has had a number of regional productions since 1986.Mr. Harnick in 2015. His lyrics could be broadly funny, slyly satirical, lushly romantic or poignantly moving. Chad Batka for The New York TimesMr. Harnick also became an accomplished opera translator, providing English librettos for classical works like Lehar’s “The Merry Widow,” Stravinsky’s “The Soldier’s Tale” and Bizet’s “Carmen.”He wrote some original opera librettos as well, including “Captain Jinks of the Horse Marines” (1975), with music by Jack Beeson, and “The Phantom Tollbooth” (1995), a collaboration with Norton Juster, the author of the children’s book on which it was based, and the composer Arnold Black. “Lady Bird: First Lady of the Land,” an opera about Lady Bird Johnson, for which he wrote the libretto and Henry Mollicone wrote the music, had its premiere in Texas in 2016 and has been performed in New York and elsewhere.In late 2015, shortly before the latest Broadway revival of “Fiddler on the Roof” opened, Mr. Harnick was in the studio making a demonstration record of songs from “Dragons,” an adaptation of a Russian play for which he wrote the book, music and lyrics, and which he had been working on for many years. In an interview with The Times, he said that he had no thoughts of retirement, and that he continued to attend every show on Broadway, as he had for many years. He added that he was working on a new show of his own.“I hope I live long enough to complete it,” he said. “I won’t tell you what idea I have, because you’ll steal it.”Robert Berkvist, a former New York Times arts editor, died in January. Peter Keepnews contributed reporting. More