PORTLAND, Maine — The federal border protection agency has offered a reprieve that may allow the Portland-Nova Scotia ferry to return to Maine next year, if the city can find up to $2 million for upgrades to its ferry terminal.

The Cat ferry’s 2018 season appeared to have been sunk last month, when the U.S. Customs and Border Protection said it would end operations at Portland’s international ferry terminal because the facility needed roughly $7 million worth of work to meet government standards.

But the agency is now saying that if the city can complete a less costly batch of upgrades to the Ocean Gateway terminal, agents will be available to conduct the required customs screenings for passengers disembarking the ferry next spring.

It’s uncertain where the funding for this work will come from and city officials have been clear that local taxpayers cannot foot the bill. But both the city and Bay Ferries Ltd. are committed to bringing The Cat back to Portland, a city official and company representative said.

[Dispute between feds and Portland could kill The Cat ferry service]

During a Dec. 14 meeting with city officials and the Canadian ferry company, the federal agency laid out a series of infrastructure upgrades and “process changes” that it sees as “critical for passenger and officer safety, and national security,” according to Customs and Border Protection spokesman Sean Smith. If these changes are made, the agency is “committed” to providing service next year, Smith said.

The city and Bay Ferries have jointly brought forward a plan for between $1.5 and $2 million worth of work to the Ocean Gateway. But many major issues, including where the money would come from and how the work would be completed before ferry is set to return in May, have not yet been sorted out.

Portland owns the Ocean Gateway terminal and Customs and Border Protection says the city is responsible for providing it with an adequate facility.

“We’re exploring non-municipal [funding] options,” said Portland Economic Development Director Greg Mitchell. “In an ideal world we’d love to see federal requirements be funded federally.”

Bay Ferries and the city have hired architects and engineers to devise a plan to outfit the terminal with closed-circuit cameras, radiation detectors, and equipment to read the license plates of cars and trucks disembarking from the ferry. This equipment alone would likely cost $1 million, according to the proposal the city sent to Customs and Border Protection.

Asked if his company planned to pay for these upgrades, Bay Ferries President and CEO Mark MacDonald declined to comment. The company is heavily subsidized by the Nova Scotia government.

Beyond the roughly $2 million in stop-gap upgrades, Smith said that Customs and Border Protection will commit to providing service at the Ocean Gateway terminal through 2020 if the city and ferry company can provide a plan to bring the terminal into full compliance with federal requirements by 2021.

The agency would want this plan by October, according to Smith, but the city and ferry company say the “best long-term approach” is to simply move the screenings to Canada — similar to a ferry that runs between the U.S. and Victoria, British Columbia.

MacDonald cast the uncertainty around Bay Ferries’ upcoming season as one of the regulatory challenges his company navigates in its normal course of business. Bay Ferries is preparing for early ticket sales, which in past have started in February, he said.

“We’ll be in business next year,” MacDonald said. “We intend to do very good business next year.”

Follow Jake Bleiberg on Twitter: @JZBleiberg.

Follow the Bangor Daily News on Facebook for the latest Maine news.