Fernando Alonso will miss the Monaco GP to race in the Indianapolis 500 next month.
The double world champion will race in a Honda-powered McLaren which will be run by the Andretti Autosport team on May 28.
"I'm immensely excited that I'll be racing in this year's Indy 500, with McLaren, Honda and Andretti Autosport," Alonso said.
"The Indy 500 is one of the most famous races on the global motorsport calendar, rivalled only by the Le Mans 24 Hours and the Monaco Grand Prix and it's of course a regret of mine that I won't be able to race at Monaco this year.
"I've won the Monaco Grand Prix twice [in 2006 and 2007], and it's one of my ambitions to win the Triple Crown [the Monaco Grand Prix, the Indianapolis 500 and the Le Mans 24 Hours], which has been achieved by only one driver in the history of motorsport: Graham Hill.
"It's a tough challenge, but I'm up for it. I don't know when I'm going to race at Le Mans, but one day I intend to. I'm only 35: I've got plenty of time for that."
Alonso revealed in a press conference on Wednesday evening that the final decision had been made at last weekend's Chinese GP after initial discussions at the F1 season opener in Australia.
"Two days ago it became serious," he said. "In Australia we talked about this possibility. We had a general talk about the future, of McLaren as a group, me as a racer - my ambitions, the Triple Crown and McLaren's ambitions to expand from Formula 1.
"Eric is French so was keen on Le Mans 24 hour in the future for McLaren. Zak is American and very keen on Indy 500. I was in the middle so it was like having two girlfriends that you have to like both of them. I was saying to Zak that Indy 500 was a great idea for the future, I was saying to Eric that Le Mans is a good idea, but individually.
"After Australia I received a call from Zak and in one moment he mentioned the Indy 500 possibility. I was thinking of 2018 initially but in China we had a dinner together and we talked a bit more seriously and we decided on Saturday that it would be a good decision for everyone. On Monday everything became real."
Who will replace Alonso?
McLaren will announce who will replace Alonso in Monaco at a later date. Jenson Button is currently under contract as reserve driver and also has an ambassadorial role with the team.
The Woking-based outfit also signed 17-year-old Brit Lando Norris to their young driver programme earlier this year. Retired world champion Nico Rosberg is based in Monaco but holds an ambassadorial role with Mercedes.
Following this weekend's Bahrain GP, the teams will stay on to take part in an in-season test at the Sakhir circuit and whoever drives the McLaren may be a pointer as to who will take the vacant seat in Monaco.
Alonso insisted that he would definitely race for McLaren for the rest of the season.
The 35-year-old added: "I've never raced an IndyCar car before, and neither have I ever driven on a super-speedway, but I'm confident that I'll get to grips with it fast.
"I've watched a lot of IndyCar action on TV and online, and it's clear that great precision is required to race in close proximity with other cars on the far side of 220mph [354km/h]. I realise I'll be on a steep learning curve, but I'll be flying to Indianapolis from Barcelona immediately after the Spanish Grand Prix."
Alonso is in the third and final year of his contract with McLaren and has grown frustrated with their poor performance with engine-suppliers Honda.
The Spaniard has been forced to retire from the season's opening two races in Australia and China and has not finished higher than fifth since rejoining McLaren in 2015. He has not won a race in F1 since the 2013 Spanish GP with Ferrari.
Could Alonso win?
In addition to Hill, Jim Clark and Emerson Fittipaldi also won the Indy 500 having won the F1 world championship.
Alonso said later on Wednesday that he was looking to manage expectations but insisted he was not going to "watch the cars go round".
"I don't go with the expectation to win. I respect the drivers racing there and the technique on a super speedway is totally different," he said.
"But a rookie won for the same team last year. Anything can happen in motor racing and I'm not going to just watch cars going round.
"I'm there to compete. I'll go and try my best to win."
McLaren's American executive director Zak Brown, who will also be in Indianapolis, believes Alonso could be in contention for a famous victory.
"Could Fernando win this year's Indy 500? Well, I wouldn't be so silly as to make any such rash prediction, but I expect him to be in the mix," he said.
"Put it this way: the team he'll be racing for won the race last year, using the same Honda engine, and he's the best racing driver in the world. That's quite a compelling combination.
"OK, equally, he'll have his work cut out to acclimatise to running at super-speedway velocities, but ultimately it's quality that counts in all forms of motorsport, and Fernando is very definitely quality. He's ballsy and brave too.
"Also, the differences between Formula 1 cars and IndyCars are less marked now than they were in the past."
McLaren's appearance in the Indy 500 will be their first for 38 years.
Watch the Bahrain GP live on Sky Sports F1 and in incredible Ultra HD! The race begins at 4pm on Sunday. Check out all the ways to watch F1 on Sky Sports for subscribers and non-subscribers - including a NOW TV day pass for £6.99!
Sky customers can now upgrade to Sky Sports and get 12 months for just £18 per month. Upgrade now!