Two fighter jets briefly touched wings during the Fort Lauderdale Air Show in Florida over the weekend in an incident that could have been much worse.

A spectator recorded video of the frightening moment when two jets in the Polaris Ghost Squadron clipped wings while performing an aerial stunt for the crowd.

The two jets were getting into formation with two other jets when the incident occurred. When the wings of the two jets touched, the aircraft fell out of formation before the pilots quickly regained control.

The incident prompted the air show to declare an emergency as a precaution. The air show said in a statement that both jets landed safely, and the pilots were unharmed, FOX13 Tampa reported.

AIR FORCE AI DOGFIGHT MEANS TECH COULD REPLACE MAVERICK VS. CHINA

Polaris Ghost Squadron

Two fighter jets in the Polaris Ghost Squadron clipped wings during the Fort Lauderdale Air Show in Florida over the weekend. The pilots went on to land the aircraft safely. (Youtube/@frograilfanning)

The spectacle of high-flying stunts continued after a brief pause.

Polaris Ghost Squadron

The jets were getting into formation during an aerial stunt when the incident occurred. (Youtube/@frograilfanning)

MILITARY JET CRASHES NEAR HOLLOMAN AIR FORCE BASE IN NEW MEXICO

The air show also featured the U.S. Air Force Thunderbirds, a Red Bull helicopter, a Navy F-18 Rhino demo team and others at the Fort Lauderdale-Hollywood International Airport. 

Polaris Ghost Squadron

The pilots quickly regained control of the aircraft after clipping wings. (Youtube/@frograilfanning)

CLICK TO GET THE FOX NEWS APP

"The excitement, looking at these wonderful planes and these demonstrations is amazing," one spectator told WSVN-TV. "I loved it. As an aviation enthusiast, I really love these shows, and it’s great that Fort Lauderdale is bringing these shows to everybody."