John McVay, Key Figure in the Making of a 49ers Dynasty, Dies at 91

John McVay, who was fired as the New York Giants’ head coach in the wake of the infamous November 1978 play known as “the fumble,” but who went on to help build the San Francisco 49ers into five-time Super Bowl champions in 14 seasons, died on Monday. He was 91.

The 49ers announced his death but did not specify where he died. His grandson Sean McVay is coach of the Los Angeles Rams.

McVay’s head coaching career in the N.F.L. lasted for two and a half years amid a string of losing seasons for the Giants. But for all the frustration he faced in New York, he gained recognition as an astute front office executive in San Francisco for nearly a quarter-century. “I had a lot of different titles,” he once said, “but I functioned as general manager basically from Day 1.”

McVay went to the 49ers soon after they hired Bill Walsh as head coach after going 2-14 in 1978. Walsh installed the West Coast offense passing game that propelled San Francisco to three Super Bowl titles in the 1980s, and he had the ultimate say in all major football decisions. But McVay played an important role in draft selections, scouting, free-agent signings and contract negotiations.

“I don’t know what I’d have done without John McVay,” Walsh told David Harris in “The Genius” (2008), a biography of Walsh. “He was nonconfrontational and nonabrasive to the extreme, never upstaging anyone, but if he didn’t agree with me he’d tell me straight out. He was the glue that held the organization together from the time he arrived.”

McVay continued to run the 49ers front office under Coach George Seifert, Walsh’s successor and his former defensive coordinator, who took the team to a pair of Super Bowl championships.

McVay was named the N.F.L. executive of year by The Sporting News for 1989, Seifert’s first season as head coach, when the 49ers staged a run to a second successive Super Bowl title.

The 49ers’ dynasty — they won the Super Bowl after the 1981, ’84, ’88, ’89 and ’94 seasons — was rooted in the selection of Joe Montana, Notre Dame’s quarterback, in the 1979 N.F.L. draft after he had slipped to the third round.

Montana’s arm strength and durability were considered questionable by many, but Walsh liked his potential.

“Bill said, ‘Can we check and see why Montana keeps dropping?’” McVay told the newspaper The Repository of Canton, Ohio, in 2012. “I told Bill, ‘Let me call one of the Notre Dame assistant coaches.’”

He contacted Bill Gruden, who had been an assistant to McVay when he was head coach at the University of Dayton.

“I asked him, ‘Billy, what’s the story with Montana?’” McVay recalled. “Billy’s response was brief. ‘Just take him.’”

Montana teamed with Dwight Clark and later Jerry Rice, both receivers, and running back Roger Craig in the innovative West Coast offensive scheme that propelled the 49ers to dominance.

McVay’s success in San Francisco came after what he once called “the most horrifying play in Giants history.”

It happened at Giants Stadium on Nov. 19, 1978, with the Giants leading the Philadelphia Eagles by 5 points in the closing seconds.

McVay’s offensive coordinator, Bob Gibson, called a third-down play, in which quarterback Joe Pisarcik was to hand the ball off to fullback Larry Csonka instead of dropping to one knee and letting the clock run out.

The exchange was botched. Eagles defensive back Herm Edwards, the future Jets coach, scooped up the loose football and ran it back 26 yards for a game-winning touchdown.

Gibson was fired the next day by Andy Robustelli, the Giants’ director of football operations, over McVay’s objections. The Giants lost three of their remaining four games, finishing at 6-10. Soon after that, McVay was fired as well, only to see his fortunes turn in San Francisco.

John Edward McVay was born on Jan. 5, 1931, in Bellaire, Ohio, where he grew up .

As a center on the Miami University football team in the early 1950s, he played under head coaches Woody Hayes and Ara Parseghian.

McVay coached high school football in Ohio, served as an assistant coach at Michigan State and was head coach at Dayton for eight years. During that time he got to know Eddie DeBartolo Jr., the 49ers’ owner, who spent time in Dayton in connection with his family’s commercial real estate holdings.

McVay was also the head coach of the Memphis Southmen of the World Football League in 1974 and ’75, the league’s only two seasons.

Before the 1976 N.F.L. season, the Giants’ head coach at the time, Bill Arnsparger — a former teammate of McVay’s on Miami’s offensive line — hired him to be an assistant coach. But when New York lost their first seven games, Arnsparger was fired, and McVay succeeded him. He soon brought in Walsh to advise his assistants on offensive schemes, while Walsh was head coach at Stanford.

But the Giants still struggled under McVay. Three weeks after the humiliation of “the fumble,” a group of Giants fans flew a small plane over Giants Stadium with a banner: “15 Years of Lousy Football … We’ve Had Enough.” After the season ended, McVay’s contract was not renewed. He left with an overall record of 14-23.

He retired from the 49ers’ front office in 1996 but had a second stint with the team from 1998 to 2004, brought back mostly to deal with salary-cap issues.

Complete information about his survivors was not immediately available.

McVay once remarked that when Walsh offered him a job with the 49ers, he flew to San Francisco “on the next plane,” and he often deflected credit for the 49ers’ dynasty to Walsh. But at his home he also displayed a photo of Walsh inscribed to him with the words: “You are the master.”