South Portland, Maine, could be the first U.S. city to pass a law to block Alberta oilsands crude from getting anywhere near its waterfront.

The city of 25,000 people is turning into a test case for local communities that don’t want oilsands bitumen shipped from their ports.

Tom Blake, the former mayor of South Portland, gave CBC News a tour of his city this week where a temporary moratorium has been imposed on any new structures used by oil companies to help load oil from a pipeline on land, to oil tankers in their port for export.

“We have no interest in having the world’s dirtiest oil come through our community," said Blake, who currently sits on city council.

South Portland sits across the bay from Portland, Maine. It’s the third-largest oil port on the U.S. East Coast.

It has provided imported oil by pipeline to Canada since 1941, when it was built to help provide a safe source of energy to this country during the Second World War.

The oil moves north from Maine through New Hampshire to Montreal via the Portland Montreal Pipeline, a subsidiary of the Canadian parent company that is owned by three companies involved in the Alberta oilsands: Shell, Suncor and Imperial Oil.

In 2008, the company applied for a permit to reverse the flow of the pipeline to bring Canadian oil to the U.S. east coast.

The plan was scrapped because of the recession and there is no current project on the books. But the company president Larry Wilson has been quoted as saying he is looking for every opportunity to revive the plan.

“The current president has stated publicly many times and to me personally that he would love to bring tarsands to South Portland,” said Blake.

So when Canada's National Energy Board approved the reversal of Enbridge's Line 9B to bring oilsands bitumen east to Montreal in early March, many in South Portland figured it was only a matter of time before that oil would be heading south to their port for export.

"They want to use the existing infrastructure because they're not getting their other pipes done as quickly as they want to," said Crystal Gooderich, a spokeswoman for local citizen's group Protect South Portland.

Last fall the group of residents formed a vocal anti-oilsands campaign and narrowly lost a citywide vote on a restrictive new ordinance on all waterfront development.

But it was enough to convince the city to pass a six-month moratorium in November on proposals to build new structures to transfer oil onto marine vessels.

Portland Pipeline's original plan included two 21-metre industrial stacks on the city's scenic waterfront to burn off gas from the piped oil before its transfer to a tanker.

The council may extend the moratorium for a further six months to allow a committee to draft an ordinance for a permanent ban.

Health and safety concerns

For Gooderich and her neighbours, it's a health and safety issue. Local neighbourhoods are dotted with more than 120 oil storage tanks that have sprouted up since the 1940s.

And the current Portland Pipeline runs right through backyards and streets lined with trendy Cape Cod style homes.

Jamie Py, the executive director of the Maine Energy Marketers Association, sees no reason to block Alberta's oilsands crude from reaching South Portland's waterfront. (CBC News) People worry about air pollution and heavy oil spilling in their scenic bay.

"The tarsands product is so difficult to clean up, almost impossible," said Gooderich.

"If we were to have a disaster in Casco Bay, or in our drinking supply in Lake Sebago, it would be something we'd never recover from fully."

The moratorium and the possibility of a precedent-setting local law have sparked a sharp response from the oil industry, which is running a series of pro-oilsands ads in local papers.

The American Petroleum Institute, which represents more than 500 oil and gas companies, called the current moratorium "ill-advised, unnecessary and unsupported."

In a letter to the city in December 2013, it warned "the proposed moratorium could cause harm to local, state and national interests."

"The development of oilsands promotes North American energy security and brings substantial economic benefits to the state of Maine." writes API, which predicts this will all end up in court.

Moratorium bad for business

Local businesses say a vocal minority have lost sight of how important the oil industry is the region's economy.

"It’s been an oil port for a long time, said Jamie Py, the executive director of the Maine Energy Marketers Association. "Eighty per cent of the shipping business that comes into the port is related to the oil business."

"It’s not unprecedented that people want to ban things, that happens all the time. On this one all I can say is look at the facts, ladies and gentlemen, let’s look at the facts of what this product is. And I think the facts will show you it's not any more dangerous or any more difficult to handle than traditional crude oil, so why do we have this big issue here?"

Proposed oil projects in California (b/d = barrel a day) San Francisco Bay area: Valero, Benicia: 70,000 b/d refinery-linked crude-by-rail terminal.

WesPac, Pittsburg: 242,000 b/d oil terminal, including rail, ship, tank farm and pipeline. Southern California Valero, Wilmington: 60,000 b/d refinery-linked crude-by-rail terminal . San Joaquin Valley Alon, Bakersfield: 150,000 b/d refinery and pipeline-linked crude-by-rail terminal.

Plains All American, Bakersfield: 65,000 b/d pipeline-linked crude-by-rail terminal. Central Coast Phillips 66, Santa Maria: Up to 52,000 b/d refinery-linked crude-by-rail terminal. - Details provided by Natural Resources Defence Council

South Portland is being closely watched by people on the U.S. West Coast. Local environmental groups in six California communities are also trying to use local laws to prevent oilsands and Bakken crude from coming to their ports by train.

"We don't want to be the pass-through sacrifice zone for crude oil transiting through California and being exported," said Diane Bailey, senior scientist with the Natural Resources Defence Council in an interview from San Francisco.

"Right now there is a domestic crude oil export ban, but that's not to say that the Canadian tarsands can't come through California coast ports to be exported, and we've very concerned that it would be all risk and very little benefit to these communities."

Py thinks that national environmental groups waging a war on the oilsands industry as a whole are using local groups to help fight the battle.

"Canadian people have made a decision that this is an OK thing to do, that this is in their best interest to do so. It’s an energy source that’s huge and we would like to do business with the United States, but there are some folks in the United States who said no, we don’t want to do business with Canada. That’s a cultural problem, it’s an economic and it’s a political problem."

In the meantime, a special committee in South Portland is carefully drafting an ordinance to stop oilsands crude from getting anywhere near an export tanker in the city's bay. There's no doubt this local law would have to stand up to intense international scrutiny.

It's expected to be ready sometime in the fall.