McLaren CEO Zak Brown says the idea of Fernando Alonso contesting this year's Indy 500 started as a joke before "accelerating" into a sensational deal for the 101st edition of the race.

On Wednesday, Alonso and McLaren rocked the motorsport world by announcing their entry to this year's race with Honda and Andretti Autosport, meaning Alonso will miss the Monaco Grand Prix. The appearance will be part of Alonso's bid to complete the triple crown -- winning the Indy 500 and Le Mans 24 Hours along with the Monaco Grand Prix, which he won in 2006 and 2007.

Brown, installed as CEO ahead of the new season, wanted to expand McLaren's racing portfolio and admits he made a throwaway comment in Melbourne ahead of the season opener to gauge Alonso's interest in competing away from Formula One.

"Well, it came about quite quickly," Brown said at a media conference in Bahrain. "The thought of doing it with Fernando Alonso and Honda was a stunning idea, felt a bit like a dream and probably a bit early to start pursuing it.

"It is one of those where it's one of those jokes with some truth to it. So I said to Fernando before Australia, 'One of these days we should do Indy together.' ... Just kind of threw it out there to see what kind of reaction I would get it, and he kind of joked back. I thought, 'OK, I've thrown the bait out in the water, but I'll leave it at that.'

"Then when Fernando and I were with [racing director Eric Boullier] and Honda in Australia it came up in conversation, one of the mornings, and Fernando brought it up and said, 'Honda, you have an unbelievably great history at the speedway, I have a dream to win the triple crown and wanted to do Le Mans in the past, and I'd love to do the Indy 500 with you. There wasn't a timeline on it, but I thought, 'Ah, he might actually be serious about this!'"

Fernando Alonso will make his debut at the 2.5-mile Indianapolis Motor Speedway in May. Andrew Hancock for ESPN

It came at a time Alonso and McLaren were getting to grips with the reality of its uncompetitive Honda power unit, which has fallen short of expectations for a third consecutive year. In the backdrop of that negativity, the joke got the cogs turning in Alonso's head, though he thought his boss was talking about the possibility of competing in 2018, not this year.

"I received a call from Zak [in Melbourne] about different things, not this one, and in one moment of the conversation, it came out again, the Indy 500 possibility," said Alonso, a two-time F1 champion. "At that point I was happy that McLaren was considering this Indy 500 entry, as they had won in the past a couple of times.

"I was happy when Zak joined the team last year, but I was even happier when Zak was telling me these plans for the future. But in a way I was thinking for 2018, as obviously it was only 55 days until the Indy 2017."

Zak Brown talks to Fernando Alonso in the garage during the Melbourne Grand Prix, where the seeds were sown for their assault on the 2017 Indy 500. Sutton Images

Honda joined the discussions over dinner during the Chinese Grand Prix weekend as it became clear there was a willingness on all sides to get a deal done in time for the 2017 race, which takes place May 28.

Brown said: "In China we discussed the ways we could go about doing it, discussed it with Honda, had dinner with myself, Eric, Fernando, his manager, Luis, and he said, 'I'm gonna go sleep on it.' Woke up the next morning, and Fernando said, 'Let's go do the Indy 500 with Honda.' [I thought], 'Oh man, now I've gotta pull this off!' And we did.

"A lot of hard work with IndyCar helping us behind the scenes, Michael Andretti, and of course it wouldn't happen without Honda's support, so that's how we got started and how we've got where we [are] today, and I think we're all very excited about it."

Graham Hill, the 1962 and 1968 world champion, is the only man to win the Monaco GP, the Indy 500 and Le Mans 24 Hours. Phipps/Sutton

Alonso was unsure it would be possible to compete at Indianapolis on such short notice, even after he had signaled to McLaren he would be competing at the race.

"On Saturday, I arrived at the circuit and said, 'Yes, this is a good decision for everyone. A win-win for myself, for F1, the fans, everyone,'" Alonso said. "Two days ago, on Monday, everything became real. I was not completely sure on Saturday in China if it was still possible to make it so quick, but we had a huge help from Indy, from the Speedway, from the promoter and together with Zak's contacts and Andretti Autosport. They helped everything become real in two days."

Though it always seemed more likely Alonso would contest the Le Mans 24 Hours before he would attempt the race at Indy 500, Brown said he believes Alonso's openness to the idea and determination to win the triple crown -- something only Graham Hill has achieved -- helped bring everything together quickly.

Said Brown: "Fernando's desire to do it and our desire to do it and our desire to support him and do it together accelerated how quickly we were able to make this happen."