The Yankees would become the team of the 1990s, and so it is easy to forget just what a bubbling mess of chaos and ineptitude the 1990 squad was.

They would have the worst record by any Yankees team in 77 years. They were constantly enmeshed in soap opera and distraction — mainly because that was the year George Steinbrenner had received what was then a lifetime ban by commissioner Fay Vincent for associating with gambler Howie Spira in order to get damaging information on Dave Winfield.

In what was to be his last act as principal owner, in late August of that season, Steinbrenner named Gene Michael general manager.

It only changed Yankees history — and baseball history — forever.

Michael died of a heart attack Thursday at age 79. His final career average as a player was .229, but he was a giant of the game, the guy who put the cornerstones in place for the last Yankees dynasty.

Michael had a rambling, stream-of-consciousness way of speaking that could belie his brilliance about baseball. He was a savant at talent judgment, able to discern what others could not see while perhaps not being able to articulate it in words.

Late in that 1990 season — my second year as the Yankee beat reporter for The Post — Stick brought me into his office at the old Stadium. He started to point to numbers next to names: .257 for Oscar Azocar, .258 for Alvaro Espinoza, .259 for Bob Geren, .272 for Mel Hall and so on.

I was not sure what he was showing me. They were on-base percentages. I am sure Stick never read Bill James, and this was more than a decade before “Moneyball” would be published. But something sat wrong in his baseball soul. “Our offensive innings go too fast, we make it too easy on the pitcher, we have to have better at-bats.”

And from that was formed a philosophy that would transform the Yankees. Michael steadily removed the easy outs and first imported players such as Mike Gallego and Mike Stanley, professionals who helped the clubhouse and guys who worked the count. He stuck with Bernie Williams through a tough apprenticeship because he loved how disciplined Williams was.

In his most controversial move when enacted after the 1992 season, he traded Roberto Kelly, arguably the team’s best player, to Cincinnati for Paul O’Neill. He thought Williams was better than Kelly, that Kelly had peaked and was not ever going to turn at-bats into long fights, and he saw in O’Neill an intense hitter plus a lefty bat at a time when Michael wanted to get the Yanks back to using the Stadium dimensions to their favor.

He also hired Buck Showalter to his first managing job, eschewing veteran men he knew better such as Hal Lanier and Doug Rader. Together Michael and Showalter created a roster and culture that they would hand off to Joe Torre and Bob Watson and Brian Cashman for dynasty. They had formed a clubhouse of professionals and a roster of tough guys and tough outs.

Michael was always firm that the most important organization to scout was your own, and he made scads of trades to improve those early 1990 Yankees, but he never touched Williams, Derek Jeter, Mariano Rivera, Andy Pettitte or Jorge Posada, even at times when Steinbrenner — who returned in 1993 — would scream to do so. The Boss had a particular early fascination with wanting to get rid of Williams, and Stick would resort to lying that he had called other clubs and no one wanted Williams as a way to protect him.

Of all the many employees who came and went under Steinbrenner, Michael was the one he trusted most — or the most by someone as impetuous as Steinbrenner. What made Michael so admired in the organization — beloved, actually — was his willingness to stand up to The Boss. Steinbrenner had layered his organization with spies and toadies, but no one ever thought that Michael retained employment as coach, manager, GM, scout or adviser for those reasons. He told Steinbrenner hard truths regardless of how that would affect his job.

Even when he left as GM after the 1995 season, he stayed with the organization as something akin to a guru, his wisdom and scouting acumen invaluable not only in player personnel but in training others to try to see and value what he saw and valued. Even as his health teetered in recent years and analytics took on a greater role, Michael would be dispatched by Cashman to watch a particular player, often in the Yankees organization, and his views remained as treasured as ever.

On a personal note, Michael was among a group of baseball people that includes Showalter who were incredibly generous with their time and insights and helped form how I see the game. Michael kindly would tell me often that I could be a GM, and I would always reply that my first move would be to hire him and fire myself so we could win.

Gene Michael had a warm, engaging personality. He could stand up in the middle of a room and suddenly break into a batting stance he had seen from a prospect 20 years earlier and describe why it would never work in the majors to make a point about someone playing now. He probably forgot more baseball over time than just about anyone else knows.

He will most be remembered for taking the ruins of the 1990 Yankees and forming the team of the ’90s. But you should know he was more than that. He was a good man, gone too soon.