JOHN MAYER may have won KATY PERRY’s heart, but she might not stick around for long after finding out her BFF RIHANNA was his first choice, The ENQUIRER has learned.

Insiders say the 34-year-old playboy – who’s long had a love ’em, leave ’em, and then dish dirt on ’em reputation – put on a full-court press to get a date with the Barbadian bombshell, but she shot him down every time.

John first put the moves on Rihanna at a 2009 music industry party in New York.

“They really hit it off,” one source explained. “John was smitten. He tried to lure her back to his place on several occasions, but Rihanna just laughed him off, saying she wasn’t his type. That only made him want her more.”

Rihanna had reason to be suspicious be suspicious. In 2010, John made headlines when he suggested in a “Playboy” interview that he wasn’t attracted to women of other races.

“That was all bull be­cause he’s a dyed-in-the-wool horn dog and ALL girls turn him on,” contend­ed the source. “And despite what he said, Rihanna has ALWAYS been a fantasy chick for John.”

He tried again to seduce the 24-year-old stunner at a party last year, but Rihanna wouldn’t play along. And it was only after he’d exhausted all his efforts, say pals, that he turned his attention to Katy, 27, whose divorce from British actor Russell Brand was finalized on July 16.

“Katy has no idea just how hard he tried to score with Rihanna,” said another source. “Now, her pals are worried she’s headed for heartache”