Sandy Wilson, the author, composer and lyricist whose winsome, nostalgic and tuneful pastiche of 1920s musicals, “The Boy Friend,” made a stage star of Julie Andrews and later a movie star of the model Twiggy, died Aug. 27 in Taunton, England. He was 90.

His agent, Nick Quinn, confirmed the death but did not disclose the cause.

“The Boy Friend,” first staged in 1953, was the grand slam of Wilson’s theatrical career. It ran for more than five years in London and had a respectable run of 485 performances on Broadway with 19-year-old Andrews making her American debut in the lead.

The aggressively gossamer plot plays with the cliches of vacuous flapper-era musicals. A wealthy girl meets a messenger boy (really the son of a British lord) on the French Riviera in 1926, and they try to hide their vast fortunes from each other.

Songs such as “I Could Be Happy With You” (“I could be happy with you, if you could be happy with me”), “The Boy Friend” and “Won’t You Charleston With Me?” were jaunty throwbacks to the syncopated “vo-do-de-oh-do” of Roaring Twenties pop songsmithing.

In The New York Times, theater critic Brooks Atkinson called it “a delightful burlesque.” But the play was predominantly a showcase for the vocal range and comic expressiveness of Andrews, who balanced its charm and satirical impulse. (Her best-remembered stage role, as Eliza Doolittle in the musical “My Fair Lady,” was two years away.)

The success of “The Boy Friend” made Wilson the rage of theater circles in London and New York. He was dubbed the next Bright Young Thing, and he won comparisons to his idol, the wasp-witted playwright and entertainer Noel Coward.

But as was pointed out by the theater critic Kenneth Tynan, a classmate from the University of Oxford in the 1940s, “it was plain even in the revues he wrote at Oxford that Wilson’s talent was not for the bold whiplash wit of the enfant terrible. … His personality, tidy and fastidious, was reflected in the restraint and delicacy of his work.”

None of Wilson’s later musical stage work equaled “The Boy Friend” in commercial or critical acclaim. He would say that “The Boy Friend” always held a place in his heart because it gave him the economic means never to work again. Its chaste lyrics and simple casting requirements made it a staple of high school and community theaters all over the English-speaking world.

His most ambitious endeavor was the madcap musical “Valmouth” (1958), adapted from British author Ronald Firbank’s novel about a black masseuse (played by Cleo Laine). “Of necessity every song in ‘The Boy Friend’ was a pastiche of another song,” Wilson told the Observer, a British publication, in 1994. “‘Valmouth’ is me. It’s my favorite show.”

He also wrote “His Monkey Wife” (1971), a musical based on a John Collier satirical story of a man’s apparently requited attachment to a female chimpanzee.

Alexander Galbraith Wilson was born May 19, 1924, in Sale, England. During the Depression, the family downsized to a small apartment in London and his mother found work running a small hotel.

The record player at home, which spun pop tunes from 1920s musicals such as “No, No, Nanette,” sustained Wilson’s spirits during lean times.

“Totally unaware of family troubles and financial difficulties I simply absorbed the songs and dances of the day and grew up convinced that they were what the 1920s were all about,” he once wrote.

He became entranced by movies and plays and fantasized about writing a smash hit for the stage in the vein of Coward or Ivor Novello.

He won a scholarship to an elite preparatory school and, after army service as a clerk in World War II, received a degree in English literature from Oriel College at Oxford.

Wilson contributed to revues in London’s West End, including “Slings and Arrows” starring Hermione Gingold, who became one of his earliest advocates. He wrote a few short-lived plays, “See You Again” (1951) and “See You Later” (1952), before “The Boy Friend” made him a bankable commodity.

The musical originated as a one-act divertissement commissioned by the Players’ Theatre in London, intended mostly “to relieve the monotony of pseudo-Victorian cabaret,” Tynan once wrote.

The parody provoked ripples of laughter among ticket buyers and critics, and it soon was expanded into a full-length show at a bigger theater in London’s West End.

American producers Cy Feuer and Ernest H. Martin, who were scouting in London for new material after their long and profitable run of “Guys and Dolls,” spotted the potential of Wilson’s work to delight New York theatergoers.

Feuer and Martin wanted a different leading lady for a Broadway run, and director Vida Hope recommended Andrews, then a promising teenage musical-comedy actress.

Andrews, who directed a touring revival of “The Boy Friend” in 2005 and 2006, explained the show’s appeal. “If it’s done right, it has everything an audience loves: a laugh, a cry, a song, a dance,” she told the Toronto Star. “And it’s also romantic in the sweetest, simplest sense of the word.”

Sandy Duncan starred in a well-received, albeit brief 1970 staging of “The Boy Friend” on Broadway. Ken Russell took great liberties with the plot for his 1971 screen version, starring Twiggy and Christopher Gable in the romantic leads.

Wilson said he was horrified by Russell’s bowdlerized movie, which added fantasy sequences and new plotlines. “I recognize some of the tunes” were the kindest words the composer could muster.

Wilson wrote a sequel of sorts to “The Boy Friend” called “Divorce Me, Darling!” (1965), aging the original show’s character types by a decade and lampooning Cole Porter and Noel Coward musicals of the 1930s. Flappers became maritally faithless sophisticates.

Reviews were scathing. A Time magazine critic wrote that “too often the emeritus flappers’ old boop-boop-a-doop has gone poop.”

Undeterred, Wilson poured out new shows and books, including “This Is Sylvia: Her Lives and Loves” (1955), a sly parody memoir about his cat.

Survivors include his partner, Chak Yui.

Wilson, whose acclaimed 1975 biography was called “I Could Be Happy,” projected in interviews undeniable gloom about the course of his life. Achieving fame and riches at 30, he said the rest of his career seemed like a long denouement.

He could be biting about other plays and shows, particularly musicals. Popular music lost its appeal, as far as he was concerned, after the Porters and Cowards stopped writing it.

“I’ve hated it since 1950,” he told the Observer in 1994. “Since rock and roll, I’ve turned a deaf ear.”