Alan Jay Lerner, 67, a playwright and Broadway lyricist who electrified the Broadway stage, enthralled audiences and entranced critics with such memorable productions as "Brigadoon," "Camelot" and "My Fair Lady," died of cancer yesterday at the Memorial Sloan-Kettering Cancer Center in New York City.

He wrote a majority of his most highly praised work with composer Frederick Loewe, and the names Lerner and Loewe were linked at the top of the entertainment world for more than a quarter of a century. Along the way, they wrote the songs for some of the greatest musicals of the postwar world and worked and collaborated with some of the greatest directors and acting talents of the stage and screen.

The Lerner and Loewe partnership began in 1942. But it was not until five years later that they had their first hit, "Brigadoon," a romantic fantasy set in Scotland. Lerner wrote a haunting text, and audiences fell in love with the show's hit tune, "Almost Like Being in Love." "Brigadoon" became the first show to win New York Drama Critics Awards for both book and lyrics by the same author -- Lerner.

Among the Lerner and Loewe efforts after "Brigadoon" was "Paint Your Wagon," which appeared in 1951. Its reception was not enthusiastic, though it did include the memorable song, "They Call the Wind Maria."

On March 15, 1956, at the Mark Hellinger Theater in New York, history was made with the triumphant opening of the fifth Lerner-Loewe musical, and what was to be their best and most successful, "My Fair Lady." The story was based on George Bernard Shaw's play "Pygmalion," the story of the transformation of Cockney flower girl Eliza Doolittle into a society figure by illustrious voice professor Henry Higgins.

At the play's final preview, the night before it opened, Lerner, who wrote the show's book and lyrics, was visibly nervous. He later told how Nancy Hayward, wife of producer Leland Hayward, took him aside and sternly told him, "Alan, listen to me and listen to me well. What is happening in this theater is incredible. It is something that has happened to few people and will never happen to you again . . . . Stop worrying and enjoy it. Do you hear me? Enjoy it!"

The musical was directed by Moss Hart and starred Rex Harrison as Professor Higgins, Stanley Holloway in a memorable role as Alfred P. Doolittle -- and Julie Andrews, a young unknown from the London music halls, as Doolittle's daughter Eliza.

Lerner did little to change Shaw's work. The major shift was the resolution of the relationship between the professor and the flower girl, which the audience learns about when Higgins sings that "I've Grown Accustomed to Her Face."

Other songs, lyrical, rousing, comic and gay, included "The Rain in Spain," "I Could Have Danced All Night," "On The Street Where You Live," "With a Little Bit of Luck," "Wouldn't It Be Loverly" and "Get Me to the Church on Time."

If the songs were exceptional, they reflected the philosophy of the man who wrote them. He said that two traits made him particularly suitable for the big musicals of the '40s and '50s. One was that he was a "romantic at heart" and the second was that he wrote lyrics that are about "character" and advance the story.

He said that writing lyrics gave him "an excitment, an exhilaration, exuberance that makes me feel as close to the joy of living as I'll probably ever know."

Harrison once recalled how easily Lerner and Loewe worked together. When they were giving him an informal tryout for the part in London, Harrison said, his limited singing range quickly became obvious. "I had four or five notes they could use. They produced a song embracing just those four or five notes and it was called 'I've Grown Accustomed to Your Face' ."

Both in New York and London, "My Fair Lady" set records for the longest run of a musical. The total in New York reached 2,717 performances. Among the awards it received were the New York Drama Critics and Antoinette Perry (Tony) awards for the year's best musical. Columbia Records sold more than 5 million copies of the cast album, the show was produced in more than 20 countries, and it was made into a memorable movie in 1964. "My Fair Lady" returned to Broadway in 1976 and again was a hit.

The next Lerner-Loewe production was "Camelot," which was produced in 1960. Lerner again wrote the book and lyrics and Loewe wrote the music. Once again, Julie Andrews starred and Moss Hart directed. Based on T.H. White's novel of the Arthurian legend, "The Once and Future King," it featured Richard Burton as Arthur, Andrews as Queen Guinevere and Robert Goulet, making his Broadway debut, as Lancelot.

"Camelot" was certainly a hit, but to many critics it was a step down from "My Fair Lady." Some believed that Arthur's story depended too much on scenery and lacked the wit and subtle dialogue of the former hit. Moss Hart suffered a heart attack during rehearsal and died after the show opened. Lerner and Loewe quarreled, with Lerner being hospitalized with bleeding ulcers and both maintaining they would never again work together.

Yet, for all that, "Camelot" was a hit and included those songs which were both memorable in their own right and advanced the story plot -- elements audiences had come to expect in a Lerner-Loewe production. The songs included the trumpeting title song, Burton's wistful "How to Handle a Woman," Andrews' light and pleasant "The Simple Joys of Maidenhood," their duet wondering "What Do the Simple Folk Do?" and Goulet's romantic "If Ever I Would Leave You."

A decade after "Camelot," Lerner and Loewe reunited to work on the score for the movie "The Little Prince." Lerner won two 1958 Oscars for the movie "Gigi," one for his work as a lyricist and the other for the best screenplay. He had won a 1951 Oscar for his screenplay of "An American in Paris." He also won a 1965 Grammy Award for "On a Clear Day You Can See Forever." He adapted a number of his plays to the screen.

His last Broadway show, "Dance a Little Closer" in 1983, got poor reviews and closed after one night on Broadway. But Frank Rich, theater critic for the New York Times, observed that despite the play's problems, Lerner's book and lyrics showed why "he is one of our musical theater's top professionals."

Although best remembered for his work with Loewe, Lerner collaborated with other theater greats, including Kurt Weill, Burton Lane and Leonard Bernstein. His memoir, "On the Street Where I Live," was published in 1978.

Lerner and Loewe were named to the Songwriters' Hall of Fame in 1971. They were honored for their lifelong contributions to American culture at a 1985 celebration at the Kennedy Center in Washington. Lerner was honored last year by the National Academy of Popular Music with its "Johnny Mercer Award" for his lyric writing.

President Reagan said, "Nancy and I join all Americans in mourning the sad loss of Alan Jay Lerner, one of this nation's finest lyricists. Through his words Alan gave expression to the romantic thoughts and feelings that all of us at some time have shared in our hearts."

Alan Jay Lerner was born in New York City on Aug. 31, 1918, the son of the millionaire founder of the Lerner Stores who was an inveterate theatergoer. Lerner later told how, beginning at the age of 5, he began seeing every musical on Broadway and deciding that was the life for him, though he was an heir to a sizable fortune.

He attended Choate, where he and John F. Kennedy coedited the school yearbook, and he graduated from Harvard in 1940, in the same class with Kennedy. Unable to enter the Army because he had been blinded in one eye while boxing on a college team, he wrote ads for radio before being approached in 1942 by Frederick Loewe, 14 years Lerner's senior, to form a partnership of sorts. Their first effort, "Life of the Party," was produced in Detroit in 1942 and soon closed.

Lerner was married eight times -- to Ruth O'Day Boyd, dancer Marion Bell, actress Nancy Olson, Micheline Muselli Posso di Borgo of the Italian nobility, editor Karen Gundersen, actress Sandra Paine, Nina Bushkin and his present wife, British actress Liz Robertson. He had three daughters and a son.