The Saudi Arabian Grand Prix is expected to go ahead as planned after hours of meetings following a missile attack near the track in Jeddah.
The drivers spent four hours after practice on Friday discussing whether the race should be run.
But eventually at 2.30am local time on Saturday, after further reassurances from bosses, they agreed to race.
After an extraordinary series of events, team bosses emerged from the meetings to say: “We will be racing.”
Yemen’s Houthi rebels claimed responsibility for the attack on an oil depot about nine miles from the track, according to the Associated Press.
Second practice was delayed by 15 minutes after the attack as team bosses and drivers were called to a meeting with F1 president Stefano Domenicali.
The drivers went into a meeting with Domenicali and managing director Ross Brawn about an hour after the end of practice and that meeting did not end for another four hours, as various senior figures came and went.
BBC Sport has learned that a significant number of drivers had concerns about the safety of the event following the attack.
But eventually they were convinced to go ahead and race after being given further information by bosses.
Part of this information involved the possible consequences of not racing, such as how easily teams and drivers would be able to leave the country if the race did not happen.
The first signs of the attack came as smoke had billowed across the track during the first practice session in the afternoon.
Before second practice, Domenicali called teams and drivers to a meeting and told them the weekend would proceed as planned and that security for the grand prix has been a priority for the authorities.
He said he would keep them updated through the weekend and met them again just over an hour after practice finished to share further information.
But the drivers continued to be concerned about the potential risks of racing so close to a missile strike on a high-profile Saudi facility. The grand prix is also closely associated with the Saudi royal family.
All the drivers’ post-practice media sessions were cancelled.
F1 said after practice had finished but before the drivers went into their marathon meeting: “Formula 1 has been in close contact with the relevant authorities following the situation that took place today.
“The authorities have confirmed that the event can continue as planned and we will remain in close contact with them and all the teams and closely monitor the situation.”
Mohammed Ben Sulayem, president of F1’s governing body the FIA, said: “They are targeting the infrastructure, not the civilians, and, of course, not the track. We’ve checked the facts and we’ve got assurances from the highest level that this is a secure place. Let’s go on racing.”
There was a similar attack a week before the race, while F1 was at the opening event of the season in Bahrain.
Once second practice started, Ferrari’s Charles Leclerc set the fastest time by 0.14 seconds from Red Bull’s Max Verstappen. But the Monegasque, winner of the first race of the season in Bahrain last weekend, later hit the wall at Turn Four and damaged his car’s steering.
Verstappen’s best time was set on the harder medium tyres while Leclerc’s was on the soft, because traffic and other interruptions prevented the Dutchman completing his run on the softs.
However, Verstappen was 0.2secs down on Leclerc’s fastest time before he had to abort what would have been his best lap on the soft tyres.
Ferrari’s Carlos Sainz was third fastest, also with a fastest time on the mediums, after he too hit the wall, this time on the exit of Turn 13 and without damaging his car.
Red Bull’s Sergio Perez was fourth fastest, ahead of the Mercedes of Lewis Hamilton and George Russell. The pair were just over 0.1secs apart and Hamilton was 0.4secs off the pace.
The Mercedes cars were again suffering badly from aerodynamic bouncing – or “porpoising” – as their main limitation.
As a result, Hamilton and Russell were 0.4secs off the pace by the time they reached Turn 13, the halfway point of the track, because of the bouncing affecting confidence through the high-speed swerves of the first sector.
After that, they did not lose significant time to the fastest cars.
The Ferrari drivers’ incidents meant they were unable to go out again in the final part of the session to do their race-simulation runs on high fuel.
Behind the Mercedes, Lando Norris was seventh for McLaren, after a more encouraging showing for the team following their dismal start to the season in Bahrain, when the McLaren was the third slowest car.
Esteban Ocon’s Alpine was eighth fastest, ahead of Alfa Romeo’s Valtteri Bottas and Yuki Tsunoda’s Alpha Tauri.