Choreographer Alan Johnson worked on Broadway musicals as well as Mel Brooks comedies. (Rose Eichenbaum/Masters of Movement-Portraits of America's Great Choreographers)

Alan Johnson, a Broadway choreographer who partnered with Mel Brooks to stage some of the most delightfully farcical dance numbers ever filmed — including the goose-stepping showstopper from “The Producers,” “Springtime for Hitler” — died July 7 at his home in Los Angeles. He was 81.

He had Parkinson’s disease, said his nephew, Todd Johnson.

A wiry, calming presence backstage, Mr. Johnson choreographed solo shows and revues for performers including Ann-Margret, Bernadette Peters, Tommy Tune and Shirley MacLaine, who once christened him the “heir apparent” to acclaimed choreographers Michael F. Bennet and Bob Fosse.

Mr. Johnson devised the steps for Broadway musicals such as “Legs Diamond,” for which he was nominated for a Tony in 1989, and maintained a long attachment to “West Side Story,” ensuring that the work of choreographer Jerome Robbins was preserved in regional productions and revivals.

Yet Mr. Johnson remained best known for his work with Brooks, the comic mastermind behind television’s “Get Smart.” Following an introduction by director and lyricist Martin Charnin, Mr. Johnson served as Brooks’s choreographer beginning with “The Producers” (1967), which starred Zero Mostel and Gene Wilder as a pair of Broadway fraudsters.

The film was centered on a fictional musical — “Springtime for Hitler: A Gay Romp With Adolf and Eva at Berchtesgaden” — designed to alienate audiences and enrich its makers, who relied on a bit of “creative accounting” to make a killing from a surefire flop.

Madeline Kahn in “Blazing Saddles,” performing a routine by Mr. Johnson. (Bettmann Archive/Getty Images)

While Brooks came up with the idea of the show, generating lyrics like “Don’t be stupid, be a smarty, come and join the Nazi party,” Mr. Johnson created the campy, Busby Berkeley-like staging. Seen from above, high-stepping Nazis marched in the shape of a rotating swastika; black-uniformed SS officers pranced like characters from “West Side Story.”

To the dismay of its fictional creators, the show turned out to be a hit. In movie theaters, the reaction to “The Producers” was more mixed, although many critics have come to agree with Roger Ebert, who called it “one of the funniest movies ever made.” (The film served as the basis of a successful 2001 Broadway musical and was remade on-screen in 2005, both by director and choreographer Susan Stroman.)

Settling in Los Angeles to work with Brooks, Mr. Johnson choreographed the burlesque number “I’m Tired” for the director’s 1974 western spoof “Blazing Saddles”; Madeline Kahn, mimicking a world-weary Marlene Dietrich, strutted across the stage as a group of infantrymen danced with their rifles.

That same year, Mr. Johnson created a soft-shoe routine for “Young Frankenstein” in which a cadaver, newly brought to life by a mad scientist, bursts into a white-tie-and-tails rendition of “Puttin’ on the Ritz.” For “History of the World: Part I” (1981), he choreographed a “Spanish Inquisition” number featuring a chorus line of monks and a bevy of swimming nuns.

In a 2013 interview with the NPR program “Fresh Air,” Brooks said Mr. Johnson and composer John Morris were crucial to the success of his films. “Without those two guys,” he said, “none of my movies would have reached the heights it did.”

Shirley MacLaine with Mr. Johnson in 1984. (Ron Frehm/AP)

Alan Scott Johnson was born in the Philadelphia suburb of Eddystone, Pa., on Feb. 18, 1937. His father was a fabricator at a nearby shipyard, and his mother was a homemaker and waitress who encouraged his interest in dance.

A devotee of dancer Jack Cole, Mr. Johnson left for Manhattan after graduating high school and was 20 when he began his Broadway career, as an understudy in the original staging of “West Side Story.” He soon advanced to play one of the gang members of the Jets and served as the show’s dance captain, often filling in for injured performers.

“He had to learn practically every single one of the Jet movements and be ready to go on at any moment, because everybody in ‘West Side’ was getting the crap beat out of them when we did the rumble scene,” Charnin, one of the original cast members, said in a phone interview. “Not a week went by when somebody didn’t go out with a bruise, a sprained wrist or a sprained ankle. Alan was able to learn all of those moves and learned them very quickly.”

Mr. Johnson went on to dance in Broadway musicals including Richard Rodgers’s “No Strings” (1962) and Stephen Sondheim’s “Anyone Can Whistle” (1964), and he choreographed “The First,” a Charnin-directed musical that premiered in 1981.

By then, he was largely working in Hollywood as a choreographer. He also directed “To Be or Not to Be” (1983), a nearly line-by-line remake of director Ernst Lubitsch’s 1942 film comedy about a theater troupe in Nazi-occupied Poland. Brooks, one of the stars and producers, backed Mr. Johnson’s second venture as a director, “Solarbabies” (1986), a sci-fi flop featuring Richard Jordan and Jami Gertz.

Mr. Johnson, who is survived by a sister, received three Emmy Awards for choreography (for a MacLaine dance special and tributes to George Gershwin and Irving Berlin), as well as a lifetime achievement honor at the American Choreography Awards.

For decades, he choreographed stagings of “West Side Story,” saying he felt a duty to ensure Robbins’s steps weren’t tampered with. By his count, he restaged about 25 productions from the 1970s to 2000, when he adapted its choreography for a series of popular Gap commercials.

As the taste of dancers and audiences changed, however, staging “West Side Story” became increasingly difficult. He told the Los Angeles Times in 1997 that the rise of MTV meant many of his dancers had studied hip-hop more than ballet. “They can do some incredible things,” he said, “but just ask them to try a double pirouette.”