MADRID (AP) — Halfway through his 30-minute bike ride to work, police ordered Juan Pasamar to dismount, accusing him of breaking Spain’s coronavirus lockdown rules by exercising in public. The officers were not buying his explanation he was commuting to his job outside of Zaragoza, the northern city where he lives.

“You have a car, don’t you? Why don’t you use that?” he said he was asked.

Pasamar eventually had to hire a lawyer to convince police that the government had not banned cycling during the lockdown.

As countries seek to get their economies back on track after the devastation wrought by the coronavirus pandemic, bicycle use is being encouraged as a way to avoid unsafe crowding on trains and buses.

Cycling activists from Germany to Peru are trying to use the moment to get more bike lanes, or widen existing ones, even if it's just a temporary measure to make space for commuters on two wheels.

The transition to more bike-friendly urban environments “is necessary if we want our cities to work,” said Morton Kabell, who co-chairs the European Cyclists’ Federation.

“A lot of people will be afraid of going on public transportation, but we have to get back to work someday. Very few of our cities can handle more car traffic,” he said.

In addition to bike lanes separated by curbs, Kabell backs subsidizing electric bicycles, which could encourage commuters who have longer or hilly journeys.

The benchmarks are Copenhagen, the capital of Denmark, where half of the daily commuters are cyclists, and the Netherlands, with its vast network of bike lanes.

Still, countries around the world are catching up at different speeds.

The French government asked cycling activist Pierre Serne to draw up a plan for when its lockdown ends May 11. His recommendations, including bicycle lanes separated from other vehicles at an estimated cost of 50,000 euros per kilometer (around $90,000 per mile), have been submitted to the Transportation Ministry.

For now, France has said it will subsidize riders up to 50 euros (nearly $55) for repairs so the French can get their bicycles ready for post-lockdown rides.

In Berlin, the Friedrichshain-Kreuzberg council simply painted yellow lines on the some roads to take space from car lanes. This bike infrastructure builds on what is called “tactical urbanism” — low-cost changes that are technically simple and reversible, and they can make an immediate difference.

Similar initiatives are popping up elsewhere. Officials in Lima, Peru; Barcelona, Spain; and Milan, Italy, are speeding up plans to expand bike paths or take space from cars or current parking sites.

In Bogota, where bicycles are used mostly by Colombia's blue-collar workers, Mayor Claudia López has urged everybody returning to work this week to cycle instead of using public transportation, which is now operating at 35% of capacity.

With many U.S. nonessential businesses closed, there is little point now in cycling that isn't recreational. But cities like Oakland, San Francisco and New York are closing some streets to traffic to allow room for runners and cyclists.

Pedro Díaz, a member of Pedalibre, a Madrid cycling club, sees this as a once-in-a-lifetime opportunity to take over space from cars and resist giving it back when the pandemic ends.

“If we wait for proper infrastructure for bicycle lanes, we’ll need a municipal plan, which will take at least four years to be designed and get approved,” Díaz said. “This way, it’s just a matter of putting a fence and stopping cars from using a lane. Then it will be a fait accompli.”

If arguing for environmentally friendly transportation was a key factor for activists before, the economic fallout from the virus is adding momentum, said Laura Vergara, head of Spain’s ConBici advocacy group.

With tourism accounting for nearly 15% of the gross domestic product in Spain, outdoor vacations — whether on two wheels or not, but away from crowded beaches and resorts — could keep the industry afloat, she said.

“In Australia, bicycle sales have already skyrocketed,” Vergara said. “Why couldn’t that happen here?”

Despite having sunny days the year round, car-loving Spaniards seem to be decades behind northern Europe when it comes to commuting by bicycle.

Environment Minister Teresa Ribera, in charge of post-confinement planning, says the changes “must overcome resistance derived from habits and conceptions that are well-established.”

Ribera said she has asked mayors to extend bike lane coverage, reduce car speed limits and provide for bike parking. But it wasn’t clear if the government would fund it.

“We can, and we should, take advantage of this impulse to advance towards a new paradigm of sustainable mobility,” she said in a statement to The Associated Press.

Beyond infrastructure, cycling advocates say many minds must still be changed, noting that many officials have called for prioritizing the use of private vehicles in the lockdown.

That’s where differences by country are sharper. In Britain, where people are still allowed to leave home to exercise, cycle shops stayed open during the lockdown that began March 23. In Spain, gas stations were considered essential, but not bicycle repair shops.

And while bike-sharing in London and Paris was made free to health care workers, most Spanish cities rushed to shut down the services, saying they would be a source of contagion. Madrid's hugely successful bicycle sharing operation reopened only last week, the sixth of Spain’s strict lockdown. Bikes are disinfected nightly and riders must wear gloves.

Many riders have been fined. The French Federation of Bicycle Users has received more than 800 reports from cyclists stopped by police, and dozens had to pay a 135 euro ($146) fine for violating restrictions.

“The attitude of the police is the attitude that many people show in the streets," said Pasamar, who keeps riding despite the risks of being stopped again. Unfortunately, he said, “bicycles are for many just a nuisance.”

___

Associated Press writers Colleen Barry in Milan, Italy; Franklin Briceño in Lima; César García in Bogotá; Juliet A. Williams in San Francisco; Jona Källgren in Berlin; Jill Lawless in London; and Sylvie Corbet in Paris contributed.

___

This story has corrected the conversion to $90,000 per mile, not $32,000 per mile.

___

Follow AP pandemic coverage at http://apnews.com/VirusOutbreak and https://apnews.com/UnderstandingtheOutbreak

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.