Open this photo in gallery:

Cyclists cross through downtown Edmonton in August. Edmonton’s roads cover roughly 12,000 kilometres, with bike lanes on about 100 km of the network, Mayor Andrew Knack says.Amanda Erickson/The Globe and Mail

The mayors of Alberta’s two largest cities are prepared for a standoff against Premier Danielle Smith’s government over bike lanes, with the municipal leaders willing to put their jobs on the line to protect the pedal paths.

The provincial government this week passed legislation giving itself the power to remove bike lanes and decide the fate of future proposals. Edmonton Mayor Andrew Knack and his counterpart in Calgary, Jeromy Farkas, intend to defend not only the bike lanes but also the power local politicians have to make decisions for their communities.

Alberta’s battle over bike lanes is the latest in a series of jurisdictional skirmishes between local governments and the province. The mayors, backed by other municipalities, argue the province is big-footing local authority and expertise, much like how Alberta complains when it believes Ottawa is unjustly treading on its turf. The provincial government can remove municipal leaders and the mayors are ready to test Ms. Smith’s resolve to exercise that power.

Cycling advocates rally, petition Supreme Court to rule on Toronto bike-lane removal

Ontario Premier Doug Ford has also taken issue with bike lanes. In Toronto, his government is tearing up bike lanes after Ontario’s top court overturned a lower court’s decision to block Mr. Ford’s plans. In response, cycling advocates have asked the Supreme Court of Canada to step in.

Mr. Knack said he would consider ignoring a provincial order to remove bike lanes from Edmonton’s roadways, even if it means the government would strip him of power.

“I’m willing to accept those consequences,” he said. The mayor wants to focus on Edmonton’s affordability and safety, and bike lanes are a part of that.

“It’s important to stand for those things that matter versus being pushed around by a senior order of government,” he said.

Edmonton’s roads cover roughly 12,000 kilometres, with bike lanes on about 100 km of the network, Mr. Knack said. Removing the bike lanes, he said, would cost about $150-million, about $50-million shy of what the city needs to replace its bus fleet.

Alberta this week amended its proposed legislation so the cost of removing bike lanes would be divided between the province and the relevant municipality “on a case-by-case basis,” said Husam Khalo, a spokesman for Transportation and Economic Corridors Minister Devin Dreeshen, in a statement to The Globe and Mail.

Municipalities will be able to “make their case for retaining existing bike lanes,” Mr. Khalo added. “This includes demonstrating how the lanes serve their communities and addressing concerns around traffic flow, road capacity, emergency access and overall safety.”

Opinion: Behold Danielle Smith, the ultimate political survivor

But for Alberta’s mayors, the fight is about more than measuring the value of active transportation against the availability of parking spots.

“This is one piece of a much bigger picture around intrusion into local democracy,” Mr. Knack said before rattling off a list of issues the United Conservative Party has weighed in on through legislation and regulation. “It’s not just the local transportation network. It’s our land use planning. It’s how libraries display certain books. It’s which flags schools should fly. It’s how we count our ballots as a municipality in local elections.”

Calgary’s Mr. Farkas, once a darling of the conservative movement and now considered a moderate or progressive mayor, said he will defend bike lanes even if it costs him his job.

“And I will run in that by-election,” he said. Eliminating bike lanes on Calgary’s roadways would cost between $50-million and $75-million, he said.

“That kind of wasteful expenditure right now, in the midst of a housing crisis, infrastructure crisis, public safety crisis, doesn’t make a lot of sense.”

Ms. Smith built her political brand on defending Alberta against what she considered inappropriate meddling by Ottawa, particularly when former prime minister Justin Trudeau was in charge.

“Intrusion, overreach – these are bad things when Justin Trudeau does it to Alberta and they are bad things when Danielle Smith does it to Calgary,” Mr. Farkas said.