The tunnel runs between the German-speaking Swiss town of Erstfeld in the north and Italian-speaking Bodio in the south

Just like Hannibal in ancient times, Swiss engineers have conquered the Alps.

More than 2,200 years after the commander from the ancient North African civilization of Carthage led his army of elephants and troops over Europe’s highest mountain chain, Swiss leaders have completed another gargantuan task — and on time: Burrowing the world’s longest railway tunnel under the Swiss Alps to ease trade and congestion in European trade and travel.

Switzerland on Wednesday was inaugurating the 57-kilometer (35.4 mile) Gotthard Railway Tunnel, a major engineering achievement deep under snow-capped peaks carried out over 17 years at a cost of 12.2 billion Swiss francs ($12 billion).

Many tunnels crisscross the Swiss Alps, and Gotthard Pass already has two — the first, also for trains, was built in 1882. But the Gotthard Base Tunnel is a record-setter: It eclipses Japan’s 53.8-kilometer Seikan Tunnel as the world’s longest and bores deeper than any other tunnel, running about 2.3 kilometers (1.4 miles) underground at its maximum depth.

The thoroughfare aims to cut travel times, ease roadway traffic and draw cargo from pollution-spewing lorries trucking between Europe’s north and south. Once it opens for commercial service in December, the two-way tunnel will take up to 260 freight trains and 65 passenger trains per day.

Swiss planners have dreamt of such a tunnel for decades. And it should have an impact far beyond Switzerland for decades to come.

Switzerland pulled out all the stops for the inauguration. German Chancellor Angela Merkel, French President François Hollande and Italian Prime Minister Matteo Renzi came for a flashy celebration featuring musical bands, dancers and even a tunnel theme song.

The EU turnout is little surprise: The project, while cutting a north-south axis through central Switzerland, has received financial support and industrial know-how from around the European Union. Though Switzerland isn’t one of the bloc’s 28 members, the EU railway network will get a major boost from the shortcut through the Alps, notably on the route from Germany to Italy.

“The new tunnel fits into the European railway freight corridor, which links Rotterdam and Genoa,” said Swiss President Johann Schneider-Ammann.

He added that the tunnel will boost access “to these two important ports” in the Netherlands and Italy, said.

“Aside from saving time, more merchandise can be carried through the Alps,” he said.

In a glitzy show under purple neon lights, performers dressed up in orange miners’ suits and protective helmets danced atop a moving rail car, while others in skimpy outfits feigned wrestling. Trapeze artists hung from chains or ropes, a band blared out a thumping military march and helicopters buzzed overhead.

The tunnel runs between the German-speaking Swiss town of Erstfeld in the north and Italian-speaking Bodio in the south. Split-screen TV images showed two trains in opposition directions entering and leaving the tunnel entrances nearly simultaneously on both ends.

A test run by the European leaders turned into a sort of mini-summit: Merkel, Renzi and Hollande climbed aboard in a first-class car for a ride through the tunnel, sitting alongside Schneider-Ammann.

A band repeatedly played Rossini’s “William Tell Overture” after they arrived.

Merkel said it was a “wonderful feeling” to be on the train. She did note that “more than 2,000 meters of rocks” were above but that she had a “feeling of security because I believe in the security of the Swiss civil engineers.”

“We congratulate Switzerland because they were already so punctual, and also because the costs were kept within targets,” she added. “That’s something Germany still needs to strive for.”

At the peak of construction, as many as 2,400 workers took part in the project. The two holes were connected in October 2010, some 11 years after the first blast to build the tunnel, which took place in the last century.

In the tunnel, freight trains will run up to 100 kilometers (60 miles) per hour, and passenger trains twice that at first, but long-term ambitions are for up to 250 kilometers an hour. The tunnel is to shave 45 minutes on the trip from Zurich to Lugano, Switzerland.

Guy Parmelin, the Swiss minister of defense and civil protection, told national television that the tunnel gives his country a chance to display its “knowhow” and show “when Switzerland takes on a commitment, it keeps it.”

Forces under Parmelin’s command were taking little chance with security for the inauguration: Almost 2,000 additional Swiss troops were called in to help keep watch this week, and air space restrictions were put in place in the area.