BALTIMORE — Gene Michael, the architect behind the Yankees’ dynasty that began in the mid-1990s, died Thursday of a heart attack at his home in Oldsmar, Fla. He was 79.

Michael, who played shortstop for the Yankees from 1968-74 and served as the team’s manager in 1981-82, made his most significant impact on the organization as the general manager from 1991-95.

His patience — and willingness to stand up to George Steinbrenner — was the key to keeping the team’s young prospects who went on to lead the Yankees to four World Series titles in five years from 1996-2000.

Michael was the GM when the Yankees drafted Derek Jeter sixth overall in 1992. And he signed or drafted the other members of the Core Four: Andy Pettitte, Jorge Posada and Mariano Rivera — as well as Bernie Williams.

“Gene Michael was not only largely responsible for the success of the Yankees organization, but also for my development as a player,” Jeter said in a statement. “He was always accessible and willing to share his personal knowledge as well as support. He will be greatly missed.’’

Michael also traded for David Cone and Tino Martinez, as well as Paul O’Neill. O’Neill’s addition prior to the 1993 season sparked the turnaround for the franchise that had a losing record in four straight seasons.

“He gave me the biggest opportunity of my life,” O’Neill said.

After his run as GM, Michael stayed with the organization, serving as vice president of major league scouting until 2003, when he was promoted to vice president and senior adviser.

In recent years, Michael — nicknamed “Stick” because of his tall, thin frame — was a common sight during spring training in Tampa and at minor league games, as well as occasionally in The Bronx. The Yankees wore black armbands on their left sleeves during Thursday’s 9-1 win over the Orioles at Camden Yards and will wear them for the rest of the season.

“I am heartbroken by Stick’s passing,” Yankees GM Brian Cashman said in a statement. “He was both a friend and mentor to me and I relied upon his advice and guidance throughout my career. He did it all in this industry — player, coach, manager, general manager and scout — and his knowledge base was second to none.’’

Michael was famous for not trading prospects despite Steinbrenner’s protests — especially when it came to Williams, with Michael even telling the owner that no teams were interested in the outfielder.

“Gene Michael always supported me when I was a young up-and-coming player and, despite some struggles along the way, always believed that I would become a significant part of the Yankees organization,” Williams said in a statement. “I never forgot that, and today, we have lost one of the most treasured members of the Yankees family. … Gene was as significant a part of our World Championship teams as anyone.”

“Stick was a pillar of this organization for decades,” said Yankees managing general partner Hal Steinbrenner. “He knew the game of baseball like few others did, and was always willing and excited to talk about it with anyone in earshot. His contributions to the Yankees over the years have been immeasurable.”

Michael also spent parts of 10 seasons as a middle infielder in the majors and was known for his skill in pulling off the hidden ball trick. He had just 15 career homers and hit .229 when he retired in 1975, after also spending time with the Pirates, Dodgers and Tigers. He also managed the Cubs in 1986-87.