SOUTH PORTLAND — The cost of defending the controversial Clear Skies ordinance against a federal lawsuit by the Portland Pipe Line Corp. topped $1 million in December, and city officials are ready to spend an additional $600,058 in the months ahead as they prepare for a possible trial.

Approved by the council in July 2014, the Clear Skies ordinance banned the loading of crude oil into tankers on the city’s waterfront, effectively blocking the company from reversing the pipeline’s flow to bring oil from Canada to South Portland.

The City Council on Monday voted 6-0 to appropriate $500,000 in surplus funds to the Clear Skies Ordinance Legal Defense Fund, bringing the total contribution from taxpayers to $1.38 million. The city’s tab for the lawsuit so far reached $1,009,368 in December, according to city records.

The council also appropriated $100,058 in donations raised from community members and others who support the city’s effort to fight the pipeline’s lawsuit, which is currently before U.S. District Judge John Woodcock Jr. The total of donations to the fund is $121,680.

Woodcock is reviewing various motions by attorneys on both sides and could decide the case as early as this month, thereby avoiding a trial. However, if any facts are in dispute, the judge could decide that all or part of the lawsuit should proceed to trial in the spring.

Whatever the outcome in U.S. District Court in Portland, the case will likely wind up in the 1st U.S. Circuit Court of Appeals in Boston.

The company operates an underground pipeline that transports foreign crude oil from its harbor terminal on South Portland’s waterfront to refineries in Montreal. Largely shut down in recent months for lack of demand, the pipeline has been eyed as a possible way to export Canadian and U.S. oil to foreign markets.

Since the pipeline company sued in February 2015, the city has paid legal fees to its local attorney, Sally Daggett of Jensen Baird Gardner & Henry in Portland, and to Foley Hoag, a prominent Boston law firm with environmental expertise.

In its lawsuit, the pipeline company claims that the ban is unconstitutional because it interferes with interstate trade, discriminates against Canadian interests, devalues the pipeline and infringes on areas of regulation best left to the federal government.

The city, meanwhile, is acting “to protect the health and welfare of its residents and visitors and traditional land use authority to promote future development consistent with the comprehensive plan,” according to court documents. The Clear Skies ordinance cites concerns about air pollution associated with the bulk loading of crude oil into tankers.

Environmentalists have argued that exporting oil, especially so-called tar sands oil produced in Canada, would accelerate global climate change, while petroleum industry representatives have said the oil is no more damaging than other crude oil.

CORRECTION: This story was updated at 1:21 p.m. on Feb. 9, 2017 to correct the South Portland City Council vote tally.

Kelley Bouchard can be contacted at 791-6328 or at:

[email protected]

Twitter: KelleyBouchard