Image copyrightReutersImage caption
The Gotthard tunnel runs 2.3 km under the mountain at its deepest point

In a speech to guests in Erstfeld, near the northern entrance to the tunnel, Swiss Federal President Johann Schneider-Ammann said it was a "giant step for Switzerland but equally for our neighbours and the rest of the continent".

A live relay carried a speech from the southern end of the tunnel, in Bodio, by the Swiss federal transport minister, Doris Leuthard.

Afterwards two trains set off in opposite directions through the tunnel, each carrying hundreds of guests who had won tickets in a draw, and the new route was formally open.

A lavish show then got under way for the assembled guests in Erstfeld, with dancers, acrobats, singers and musicians celebrating Alpine culture and history.

Image copyrightEPAImage caption
The opening show was put together by leading German theatre director Volker Hesse

European leaders, including German Chancellor Angela Merkel, French President Francois Hollande, Italy's Prime Minister Matteo Renzi and Austrian Chancellor Christian Kern also attended the day's events.

Mr Hollande, who took part with others in a follow-up trip through the tunnel on a train, emerged on the southern side to give a speech in which he compared the Gotthard to the Channel Tunnel.

Recalling the great Franco-British project, which was completed in 1994, he said: "Nobody could have imagined that one day you would be able to travel from England to France in that way."

"Since then we are more united than ever and I hope the British will remember that when the day comes," he added, to laughter and applause from the audience in the Swiss village of Pollegio.

The French leader went on to praise European aspirations, including the free movement of people and goods.

The presence of high-level guests at the opening shows that the new tunnel is about more than protecting the Alpine environment, the BBC's Imogen Foulkes reports.

Europe's goods, whether Italian wine for the Netherlands or German cars for Greece, have to cross the Alps. Now they will able to do so more quickly, more safely, and more cheaply, our correspondent says.

Media playback is unsupported on your device

Media captionImogen Foulkes: "It's going very, very fast - and that you can sense"

The project, which cost more than $12bn (£8.3bn) to build, was endorsed by Swiss voters in a referendum in 1992. Voters then backed a proposal from environmental groups to move all freight travelling through Switzerland from road to rail two years later.

The completed tunnel travels up to 2.3 km below the surface of the mountains above and through rock that reaches temperatures of 46C.

Engineers had to dig and blast through 73 different kinds of rock, some as hard as granite and others as soft as sugar. More than 28m tonnes of rock was excavated, which was then broken down to help make the concrete used to build the tunnel.

Image copyrightEPAImage caption
About 260 freight trains and 65 passenger trains will go through the tunnel every day

Now the completed tunnel, delivered on time and within budget, will create a mainline rail connection between Rotterdam in the Netherlands and Genoa in Italy.

When full services begin in December, the journey time for travellers between Zurich and Milan will be reduced by an hour to two hours and 40 minutes.

The tunnel's course is flat and straight instead of winding up through the mountains like the old rail tunnel and a road tunnel opened in 1980.

About 260 freight trains and 65 passenger trains will pass through the tunnel each day in a journey taking as little as 17 minutes.

The tunnel is being financed by value-added and fuel taxes, road charges on heavy vehicles and state loans that are due to be repaid within a decade.

Swiss bank Credit Suisse has said its economic benefits will include the easier movement of goods and increased tourism.

Nine workers died in accidents while the tunnel was under construction.

Four were Germans, three Italians, and one each came from South Africa and Austria, according to German news agency dpa. They are commemorated by a plaque near the northern end of the tunnel, Swiss media report.