The Swiss Alps are one of the world’s most magnificent mountain ranges, but for anyone trying to travel through them by train, they can be a real drag. For decades, the only way for railroads to cross the mountains was to zigzag around them, going up and down hills and swerving through valleys. But starting soon, travelers trying to cross the Alps will be able to do it in nearly half the time thanks to what will be the world’s longest and deepest train tunnel.

Related Content Japan Is Getting “Invisible” Trains That Blend into the Landscape

The Gotthard Base Tunnel has been built over the course of nearly 20 years, and starting next week it will finally be open. While train travelers will have to wait until December to take a trip through the tunnel, once it is fully operational, the time it takes a train to travel the 174-mile-long trip from Zurich to Milan will be cut nearly in half, going from more than four hours to around two-and-a-half, Erik Shilling reports for Atlas Obscura. But in order to make this trip smoother, engineers had to dig deep—nearly a mile-and-a-half below ground.

Humans have lived on or near the Swiss Alps for thousands of years, but for all that time the mountain range has been one of the toughest natural barriers to overcome. The tallest peaks reach nearly 16,000 feet into the sky, separating central and eastern Europe. For thousands of years, traversing from one side of the Alps to another meant going up and down mountains, and even the quickest routes took a long time. While travel time has sped up in recent decades as car tunnels and highways have been dug through some of the mountains, the Gotthard Base Tunnel is both the deepest and longest tunnel ever built – a spectacular feat, engineer Claire Smith tells Alastair Jamieson for NBC News.

"They have been boring through really hard rock," Smith tells Jamieson. "This isn't like a [subway] line running a few meters below the surface, we're talking depths that are measured in kilometers.”

Coming in at 35.5 miles long, the Gotthard Base Tunnel beats out the previous record-holders for longest underground train tunnel by a hair: the now-second-longest tunnel, Japan’s Seikan Tunnel, is 33.5 miles long, while the Channel Tunnel connecting the United Kingdom with France is 31.4 miles long.

In order to build a tunnel that deep and long takes a lot of work. The idea for the tunnel started in 1947 when urban planner and engineer Carl Eduard Gruner made the inital sketches. Construction began 17 years ago, with enormous boring machines the length of four football fields removing enough rock from beneath the mountains to rebuild the Great Pyramid of Giza five times over, Jamieson reports.

While impressive, underground tunnels this long are not without their dangers. Eight workers died while digging out the Gotthard Base Tunnel, and small fires that have broken out in similar tunnels over the years have shown how easily a smoldering spark can turn into a raging inferno in close quarters that deep underground, Jamieson writes.

"We had to design doors that can be opened by a child and that at the same time will stop the spread of fire and smoke," Peter Schuster, an engineer with a firm that designed safety mechanisms for the tunnel, tells Swissinfo. "They have to work even if there is no electricity, and stand up to the wave of pressure, equal to ten tons, caused by trains going by."

Risks aside, the nearly-flat track will allow trains to travel underneath the Alps at speeds of up to 150 miles per hour, making travel and cargo shipping across the mountains faster and cheaper. Officials also hope that making rail shipping more competitive with trucks driving across Europe’s highway networks will help to cut carbon emissions, Feargus O’Sullivan reports for CityLab. The underground tunnel may not be nearly as scenic as a slow trip through the Alps above ground, but it's hard not to see the benefits of a fast-speed link that promises to take a sizeable chunk out of travel time across the continent.