PANAMA CITY -- Fireworks exploded as a huge container ship made the inaugural passage through the newly expanded Panama Canal on Sunday, formally launching the Central American nation's multibillion-dollar bet on a bright economic future despite tough times for global shipping.

The Chinese-owned Cosco Shipping Panama went through the Atlantic locks at Agua Clara in the early morning, sailed the 50-mile (80-kilometre) passage to the Cocoli locks near the capital and passed into the Pacific in the evening, stewarded by tugboats and cheered by dignitaries and exuberant crowds of thousands.

The $5.25 billion project went online nearly two years late after construction delays, labour strife and apparent cost overruns, but officials were still bullish and in a celebratory mood as they declared the expanded canal open for business.

"This is an achievement that all of us Panamanians should be proud of," President Juan Carlos Varela said at the inaugural ceremony on the outskirts of Panama City. "Today marks a historic moment for Panama, for our hemisphere and the world."

"This new transit route is the tip of the iceberg in making Panama once again the logistics centre of the Americas," canal administrator Jorge Luis Quijano said. "And it represents a significant opportunity for the countries of the region to improve their infrastructure, increase their exports."

Crowds that began gathering before dawn lined both sides of the canal waving flags, partying to salsa music and watching videos on giant screens. Authorities said about 30,000 people and eight foreign heads of state were attending.

"It's a one-time experience, a great achievement," said Felicia Penuela, a homemaker from Colon province. "Panama is showing the world that even though it is a small country it can do great things."

The Cosco Shipping Panama is a 158-foot-wide (48.2 metres), 984-foot-long (300 metres) behemoth that is one of the modern New Panamax class of mega-vessels that are seen as the future of global shipping and will now be able to use the canal. It carried some 9,000 cargo containers during the inaugural voyage and now heads to South Korea.

The waterway's capacity doubles with the new locks, and canal authorities are hoping to better compete with the Suez Canal in Egypt and tap new markets such as natural gas shipments between the United States and Asia.

"The Panama Canal, with this expansion, is an important player not only for regional maritime commerce but worldwide," said Oscar Bazan, the Panama Canal Authority's executive vice-president for planning and commercial development. "The canal is a winning bet."

Authorities said Sunday said that 85 per cent of the 166 reserved crossings scheduled for the next three months are for container ships. Container cargo accounts for nearly 50 per cent of the canal's overall income.

Panamanians at the ceremony expressed hope that the expansion will help the economy in a country where about 25 per cent of the people live in poverty, something that Varela echoed in his remarks.

"I think the inauguration of the locks is excellent for the current generations and those to come," said Moises Gonzalez, a 40-year-old mechanic who worked on the construction of the locks for six years. "Opportunities for us. We have to find a way for it to reach the people."

However, the party comes amid a lull in global shipping due to the drop in oil prices, an economic slowdown in China, which is the canal's second-largest customer, and other factors that have hit the waterway's traffic and income.

While authorities anticipate increasing commerce between Asia and ports on the U.S. East Coast, doubts remain that not all those ports are ready to handle the huge New Panamex-class cargo ships. Net cargo volume through the canal from the U.S. East Coast toward Asia fell 10.2 per cent in 2015, according to official statistics. Meanwhile, the Suez recently lowered tariffs by up to 65 per cent on large container carriers in an attempt to keep its traffic.

"It's important to remember that the canal does not create demand. The canal opens the route. Supply and demand on a world level is what will decide whether the Panama Canal will really bring more volume or not," said Antonio Dominguez, a general manager for global shipping leader Maersk Line, which moves about 14.2 per cent of world commerce. "What is certain is that the current canal has maxed out."

Manuel Benitez, deputy canal administrator, said officials are thinking long-term about the benefits the new locks can bring through economies of scale and saving time and costs for large ships.

"These are cyclical questions. The market will rebound again and when we are in an 'up' cycle again, shipping will generate money and the Panama Canal will generate money," Benitez said.

Since the 50-mile (80-kilometre) canal was handed over from U.S. control at the end of 1999, it has generated about $10 billion in direct income for the Central American nation and is responsible for about 40 per cent of its GDP, factoring in related economic activity. Some 35 to 40 vessels transit the waterway each day, and the canal is estimated to handle about 6 per cent of world maritime commerce.

Panama began the expansion nearly a decade ago. Originally planned to open in late 2014 around the waterway's centennial, the new locks can accommodate ships that carry up to three times the cargo of those previously able to use the canal.