Toyota was interested in talking to potential drivers for its FIA World Endurance Championship team and Alonso knew the technical director Pascal Vasselon from Formula One.
Brown discussed an entry for the 2018 24 Hours of Le Mans with Alonso and was prepared to consent to a switch to another team if certain circumstances were met.
Alonso and Toyota held talks and agreed to compete in the 24 Hours of Le Mans.
He visited Toyota's factory in Cologne for a seat fitting in a TS050 Hybrid in November 2017.
Toyota entered Alonso into a post-season rookie test at the Bahrain International Circuit later that month to build momentum.
In January 2018, McLaren and Toyota reached an agreement to allow Alonso to enter the full 2018–19 FIA World Endurance Championship to increase his motivation.
He joined Sébastien Buemi and Kazuki Nakajima in Toyota's No.
8 TS050 Hybrid and replaced Anthony Davidson.

Alonso drove a 2018 TS050 Hybrid in a three-day test session at the Ciudad del Motor de Aragón in February and drove with no artificial lights in a 24-hour kart race as preparation.
He adapted to driving the car and provided feedback to Toyota and his fellow drivers on how to develop it mechanically and technically.
He, Buemi and Nakajima took 198 points and the LMP1 Drivers' Championship with five victories including the 2018 24 Hours of Le Mans and the 2019 24 Hours of Le Mans over the eight round season, though this was enhanced by their teammates Mike Conway, Kamui Kobayashi and José María López suffering a sensor issue while leading the 2019 6 Hours of Spa and then suffering a puncture while comfortably leading the 2019 24 Hours of Le Mans with an hour remaining.
Toyota was the only factory LMP1 team that season, and the only to field hybrid cars.
Alonso left the series afterwards to focus on other ventures.
The two-time World Endurance champion and 2017 24 Hours of Le Mans co-winner Brendon Hartley replaced him.
Toyota was interested in talking to potential drivers for its FIA World Endurance Championship team and Alonso knew the technical director Pascal Vasselon from Formula One. Brown discussed an entry for the 2018 24 Hours of Le Mans with Alonso and was prepared to consent to a switch to another team if certain circumstances were met. Alonso and Toyota held talks and agreed to compete in the 24 Hours of Le Mans. He visited Toyota's factory in Cologne for a seat fitting in a TS050 Hybrid in November 2017. Toyota entered Alonso into a post-season rookie test at the Bahrain International Circuit later that month to build momentum. In January 2018, McLaren and Toyota reached an agreement to allow Alonso to enter the full 2018–19 FIA World Endurance Championship to increase his motivation. He joined Sébastien Buemi and Kazuki Nakajima in Toyota's No. 8 TS050 Hybrid and replaced Anthony Davidson.
Alonso drove a 2018 TS050 Hybrid in a three-day test session at the Ciudad del Motor de Aragón in February and drove with no artificial lights in a 24-hour kart race as preparation. He adapted to driving the car and provided feedback to Toyota and his fellow drivers on how to develop it mechanically and technically. He, Buemi and Nakajima took 198 points and the LMP1 Drivers' Championship with five victories including the 2018 24 Hours of Le Mans and the 2019 24 Hours of Le Mans over the eight round season, though this was enhanced by their teammates Mike Conway, Kamui Kobayashi and José María López suffering a sensor issue while leading the 2019 6 Hours of Spa and then suffering a puncture while comfortably leading the 2019 24 Hours of Le Mans with an hour remaining. Toyota was the only factory LMP1 team that season, and the only to field hybrid cars. Alonso left the series afterwards to focus on other ventures. The two-time World Endurance champion and 2017 24 Hours of Le Mans co-winner Brendon Hartley replaced him.
Motor racing career of Fernando Alonso