Getty Images

Bill Gates and Steve Jobs had a long, complicated relationship and a rivalry that sometimes veered toward vicious. On Sunday, though, 63-year-old Gates had plenty of praise for the late Apple CEO, who died in 2011 of pancreatic cancer.

Gates appeared Sunday's episode of Fareed Zakaria's GPS show, which focused on leadership. Zakaria, a CNN host, asked Gates about Jobs' management style, noting that Jobs broke almost every rule there is about leading a company.

"Steve [is] a good example of 'don't do this at home,'" Gates laughed.

Gates said it's easy to recall the "bad parts" of Jobs' career, saying he could at times be an "asshole" but that Jobs had some once-in-a-lifetime qualities that can't be replicated.

"Steve is a very singular case where the company really was on a path to die and it goes and becomes the most valuable company in the world with some products that are really quite amazing," Gates said. "There aren't going to be many stories like that."

Gates, who now devotes most of his time to philanthropy through the Bill and Melinda Gates Foundation, made special mention of Jobs' notorious ability to influence people, often against their better judgment.

"I was like a minor wizard because he would be casting spells, and I would see people mesmerized," he said. "Because I'm a minor wizard, the spells don't work on me. I could not cast those spells, but I'd see them and I'd say, 'Hey, don't!"

Gates pointed to NeXT, a company Jobs started in between stints at Apple. A workstation for academic institutions and professionals, the Next Computer was the first ever to allow you to email audio clips or read an ebook -- but it also cost $6,500 in 1988 or over $13,000 in 2019 money.

"When he did the NeXT Introduction," Gates recalled, "it was such nonsense, and yet he mesmerized those people... I was like, 'wait a minute, that spell should not work at all!"

At Apple, employees borrowed a term from Star Trek to describe Jobs' ability to "cast spells." They called it his reality distortion field.

"The reality distortion field was a confounding melange of a charismatic rhetorical style, an indomitable will, and an eagerness to bend any fact to fit the purpose at hand," wrote Andy Hertzfield, a software designer on the original Macintosh. "If one line of argument failed to persuade, he would deftly switch to another. Sometimes, he would throw you off balance by suddenly adopting your position as his own, without acknowledging that he ever thought differently."

Now playing: Watch this: Bill Gates's top mistake? Letting Google's Android rule...

Jobs and Gates had a tempestuous relationship over the decades. Jobs often criticized Gates for lacking passion for products, while Gates sometimes claimed Jobs didn't understand technology.

"Bill likes to portray himself as a man of the product, but he's really not," Jobs said to his biographer, Walter Isaacson. "He's a businessperson. Winning business was more important than making great products." Meanwhile, Gates in the '90s told then Apple head Bil Amelio: "Don't you understand that Steve doesn't know anything about technology? He's just a super salesman."

The two became more conciliatory in the 2000s, even sharing the stage for a dual interview at the D5 conference in 2007, the year the iPhone was released. "Bill built the first software company in the industry," Jobs said. "I think he built the first software company before anybody, really in our industry, knew what a software company was."