We've come a long way since Kitty Hawk. A pair of British pilots recently pulled off a daring aviation stunt, becoming the first to fly two planes in formation through a building.

Aerobatic pilots Paul Bonhomme and Steve Jones blasted through an empty aircraft hangar in North Wales at nail-biting speeds of more than 185 miles per hour (300 km/h), flying just 3 feet (0.9 meters) off the ground.

The feat required deft maneuvering and precision at the controls, the pilots said. And with less than 7 feet (2 m) separating the planes from the ceiling of the hangar, and only 32 feet (9.7 m) of wiggle room on either side of the aircraft, the aviators had to contend with a very small margin of error. [Supersonic! The 10 Fastest Military Airplanes]

"There's no option for getting it wrong," Bonhomme told Live Science. "If you get it wrong, it's going to be an utter mess."

Single planes have successfully flown through buildings before, Jones said, but because the stunt had never been accomplished with two pilots flying side-by-side, not knowing what to expect was one of the main challenges.

"When you learn to fly, you can find a chapter on virtually every flying maneuver that you've seen or that you know you're going to have to do," Bonhomme said. "But nobody has written a chapter on this. For us, it was a question of collecting our previous experiences of flying low and close to things, putting them together and hoping this would work."

To prepare, the pilots needed to understand the aerodynamic effects of flying low to the ground through an enclosed structure. In particular, Bonhomme and Jones focused on a phenomenon known as ground effect, which influences the lift and drag on a fixed-wing aircraft flying just above a runway or other surface.

As a plane generates lift, spirals of rotating air trail behind the wings, robbing energy from the aircraft and contributing to aerodynamic drag. But close to the ground, these air spirals, known as wing tip vortices, become smaller, lessening drag and changing the way air flows around a plane, said Richard Anderson, a professor of aerospace engineering and director of the Eagle Flight Research Center at Embry-Riddle Aeronautical University in Daytona Beach, Florida.

"The airplane is going to behave differently and more efficiently," Anderson, himself an aerobatic pilot, told Live Science. "The pilot could have to compensate for more lift."

Pilots Paul Bonhomme and Steve Jones fly in formation through a hangar in Wales on April 8, 2015.
Pilots Paul Bonhomme and Steve Jones fly in formation through a hangar in Wales on April 8, 2015.
Credit: Olaf Pignataro/Red Bull Content Pool

Furthermore, Bonhomme and Jones needed to consider how their planes were going to affect one another as they passed through the 243-foot-long (74 m) hangar. 

"The fact that they're in formation means that the air in the lead airplane is influencing the air of the plane behind," Anderson said. "When you learn to fly in formation, you learn how to compensate for the air that can be moved around by the plane in front of you."

And because the pilots traveled through the building at such high speeds, the planes needed to be lined up precisely the entire time. [In Images: Breaking the Sound Barrier]

"Even if you go in perfectly at one end, you've still got to exit out the other," Jones said. "We wanted to avoid at all costs having to do any corrections midway through the hangar."

This is what makes Bonhomme and Jones' feat "substantially more challenging" than piloting a solo plane through a building, Anderson said. "A single airplane can fly straight through the middle, but in formation, you have to consider the middle of the two ships," he explained. "The lead pilot needs to fly up a bit, and the airplane following needs to be down a bit and off to one side. This is much harder than picking a middle path through the hangar because it's not symmetric." 

Yet, even with a firm grasp of the science of airflow and the principles of aerodynamics, much of the exercise comes down to trust, the pilots said. For their part, Bonhomme and Jones have been flying together for more than 17 years.

"Trust is utterly essential," Jones said. "I wouldn't consider being involved in this sort of thing with anyone other than Paul. You need to have that trust and sixth sense of what the other bloke is thinking and what he's likely to do."

The stunt was organized by Red Bull to promote the ongoing Red Bull Air Race World Championship, a high-flying showdown that requires pilots to zoom through an aerial track at speeds of up to 230 miles per hour (370 km/h). Bonhomme is currently tied for first place in the championships, with five races remaining in the season.

This year's competition kicked off in February in the United Arab Emirates, with the next race scheduled for July 4 in Budapest, Hungary. The aerial competition is also set to make stops in the U.S. this fall: in Fort Worth, Texas on Sept. 26, and in Las Vegas on Oct. 17. Races will be broadcast on Fox Sports 1 in the U.S. (check local listings).

Follow Denise Chow on Twitter @denisechow. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.