PORTLAND, Maine — Ferry service between Maine and Nova Scotia could end next year if the city doesn’t spend millions on an upgrade of a terminal.

The Portland Press Herald reports U.S. Customs and Border Protection says its agents work in inadequate facilities at the terminal and that upgrades are long overdue. Portland Economic Development Director Greg Mitchell says the improvements could cost as much as $7 million.

Portland officials say they are planning a formal response for the federal government about how to move forward. Possible solutions include a smaller investment by the city.

Customs and Border Protection agreed in 2014 to operate a temporary screening facility at Ocean Gateway terminal. The ferry carries passengers from Portland to Yarmouth, Nova Scotia. It has faced financial troubles and other uncertainties in recent years.