The two, who have been spotted together, nearly met on the set of Robert Rodriguez's 'Machete Kills,' in which Heard had a role and Musk made a cameo.

Newly single Amber Heard recently has been seen about town with a new pal — Elon Musk. Turns out it was a friendship in the making for four years, ever since the Tesla founder nearly met Johnny Depp's now-former wife while doing a cameo in Robert Rodriguez's 2013 film Machete Kills, in which Heard had a role (as Miss San Antonio). Musk, 45, didn't have a scene with Heard, 30, but apparently became infatuated anyway, according to a source close to the set, and began sending emails to Rodriguez and others — some made available to THR through a confidential source — asking him to set up a rendezvous.

"If there is a party or event with Amber, I'd be interested in meeting her just out of curiosity," Musk wrote. "Allegedly, she is a fan of George Orwell and Ayn Rand … most unusual." Rodriguez and team did indeed set up a dinner, but Heard — who was dating Depp at the time — didn't show, leading Musk to try again. "Can you send her a note saying I would like to get together for lunch in LA?" he emailed the Rodriguez team again. "Am not angling for a date. I know she's in a long-term relationship, but … Amber just seems like an interesting person to meet."

Despite recent reports that the two have been spending a lot of time together, a source close to Musk contends that it's nothing romantic: "As for now, they are just friends."

A version of this story first appeared in the Sept. 9 issue of The Hollywood Reporter magazine. To receive the magazine, click here to subscribe.