They first played against each other three years ago in the Match Play Championship - it was McIlroy's professional debut in America - and the 22yearold from Northern Ireland birdied the last two holes for a one-up victory in the second round.
A year later, Mahan and Zach Johnson faced McIlroy and Graeme McDowell in a foursomes match at the Ryder Cup. The Americans were three down after just seven holes and lost.
So when Mahan talked about his tough road to the final pairing at the Match Play Championship last weekend, and how he had beaten five great players to get there, he quickly added: "I've got to beat one more incredible player to win."
He did that on Sunday to capture his second World Golf Championship title. But he understands why so many people left the tournament still buzzing about McIlroy, and how much better he can get.
"I mean, he's phenomenal," Mahan said. "He's really talented. He'll be No 1 eventually. I'm not worried about it. I'm sure he's not."
McIlroy is No 2 now, but he could climb to No 1 this week with a win at the Honda Classic, or perhaps a week later at Doral. He will take a three-week break after that to get ready for the Masters, where he will be among the favourites, along with Tiger Woods and Phil Mickelson, who have seven green jackets between them.
But almost everyone believes it is just matter of time before McIlroy claims more major victories.
Since an injury scare at the PGA Championship last year, when he tried to hit a seven-iron with a tree root in the path of his swing, he had finished out of the top 10 just once in 11 tournaments.
He has a swing that is easy on the eye and packed with plenty of power. He has a keen short game, and there was no better example of that in the semi-finals of the Match Play against Lee Westwood. He pitched 20 feet away from the flag to ride the spine of a ridge, and watched the ball gently take the slope to a foot from the hole for a birdie.
He has looked suspect at times with short putts, but from outside 20 feet, just about every putt looks as if it has a chance.
The knock on McIlroy is that he has only four wins. Martin Kaymer, the 27-year-old German, who has been on tour one year longer than McIlroy, already has 10 wins, including a major and a World Golf Championship.
But the quality of McIlroy's wins cannot be ignored, including last year's US Open.
* Associated Press