PANAMA CITY — President Barack Obama visited the Panama Canal on Friday for a first-hand look at an expansion of the waterway to accommodate larger cargo vessels that may pressure the U.S. to modernize its port facilities.

Obama stopped on Friday at the canal en route to a meeting with Panamanian President Juan Carlos Varela. The U.S. leader is in Panama for the Summit of the Americas, where one of the topics for discussions will be trade.

The president toured the Miraflores lock, which ships pass through on the Pacific Ocean side of the canal. He visited the operations building and strolled across one of the lock chambers on a walkway.

The Panama Canal looms large over Obama’s political agenda in Washington, where he faces an expiration of transportation infrastructure funding next month and stalled progress in Congress on legislation that would give him the authority to more easily ratify trade agreements.

Obama is also pressing skeptical Democratic lawmakers to support the Trans-Pacific Partnership trade accord, which the administration says would increase U.S. exports by $123 billion annually. Much of that traffic, plus imports from Asia, would travel through the Panama Canal, less than 10 miles from the site of this week’s regional summit.

Workers on the outskirts of Panama City are putting the finishing touches on a new set of locks and widening the canal to fit ships hauling containers and natural gas. Delayed by cost overruns and disputes with contractors, the project’s completion is now forecast for the second quarter of next year, almost two years behind its originally planned inauguration in 2014 — the waterway’s centennial.

The $5.3 billion expansion has made Panama’s economy one of the world’s fastest-growing for years. The $43 billion economy is expected to expand 6 percent a year through 2019, according to the country’s Finance Ministry.

The number of ships using the canal rose 1.1 percent in March after climbing 2 percent in February, according to data from the Panama Canal Authority on April 8.

Bigger ships passing through the canal will mean more cargo is loaded and unloaded at U.S. ports. The Port of Virginia in Norfolk has had 50-foot shipping channels ready since 2007 and secured a $15 million U.S. Transportation Department grant last year to more efficiently move trucks ferrying cargo in and out of the port.

As the only U.S. East Coast port that can accommodate the biggest ships, the Port of Virginia is looking to beat out competition from ports in Savannah, Georgia; Charleston, South Carolina; Baltimore and New York-New Jersey.

The Port Authority of New York and New Jersey is spending $1.3 billion to raise a bridge so the ships can fit, Baltimore’s port has one berth that can fit them, and Savannah and Charleston — only 90 nautical miles apart — are scrambling to dredge their channels deep enough for the ships’ drafts.