PORTLAND, Maine — As much as $2 million appears to have been found to upgrade the city’s international ferry terminal, clearing a major obstacle to the 2018 return of the Portland-Nova Scotia ferry.

The company that runs The Cat ferry and the Nova Scotia government will pay for most of the work the U.S. government requires done to Portland’s Ocean Gateway terminal, Bay Ferries Ltd. CEO Mark MacDonald said Wednesday.

The city and ferry company have been searching for funds to renovate the terminal since at least last fall, when the U.S. border protection agency announced it would end customs service there because the facility does not meet federal standards. People must go through a customs screening to enter the country.

U.S. Customs and Border Protection initially said the terminal needs $7 million worth of work, but later agreed to operate there this year if between $1.5 million and $2 million worth of upgrades are made.

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

Bay Ferries, which is heavily subsidized by Nova Scotia taxpayers, will be the “primary funding party” for work on the terminal, “although there is cost to all parties,” MacDonald told the Bangor Daily News. He said it is not company practice to discuss specifics and that the final cost of the work has not been determined yet.

The Cat is scheduled to return to Portland on June 8, and Bay Ferries has begun booking passage online at an early, discounted rate.

City officials have said that local taxpayers cannot and will not shoulder the burden of upgrading a facility operated by the federal government, while Customs and Border Protection have said it’s not their responsibility renovate the city-owned terminal.

The city is working with Bay Ferries and the federal government to “finalize arrangements” for the upcoming ferry season, city spokeswoman Jessica Grondin said Wednesday. “In the meantime, it’s business as usual and all of us are looking forward to a strong season.”

[The Cat ferry between Maine-Nova Scotia has chance at 2018 season]

Bay Ferries and the city 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 a proposal the city sent to Customs and Border Protection.

Beyond these stopgap upgrades, a Customs and Border Protection spokeswoman said that the agency will commit to providing service at the Ocean Gateway terminal through 2020 if the city and ferry company can provide a plan to bring it into full compliance with federal requirements by 2021.

City officials have said that in the long term they would like to see the border screening process moved to Canada.

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

Follow Jake Bleiberg at: @JZBleiberg.