Early on Sunday morning in Karachi, a group of girls are riding loops around an empty stretch of road outside the colonial-era Custom House. At 6am they left the narrow alleys of the old neighbourhood of Lyari, branded a war zone by national and international media after a lengthy and brutal gang conflict. Two hours later they are still happily pedalling away, in ballet slippers and with headscarves tucked under helmets.

“I used to cycle alone,” says Gullu Badar, 15. “It’s nice to cycle here because there’s no danger, no cars. It feels good that there are other girls cycling with me too.”

“Don’t you want to take a break?” asks Zulekha Dawood, their instructor from the Lyari Girls Cafe collective. “No,” they shout, and continue chasing each other around.

The ego of our men is very fragile. If someone is trying something new they cannot tolerate it Aliya Memon

It is rare to see women cycling in Pakistan but scenes like this are increasingly being played out across Karachi on weekend mornings. Numerous cycling groups take over the empty streets, such as the Critical Mass movement. Cycling initiatives have made their way to campuses such as the NED University of Engineering and Technology. There are also sponsored and themed bike rides, including ones to raise awareness of polio, to mark the start of mango season and to honour Muhammad Ali Jinnah, the country’s founder.

As cycling becomes more popular, many people are returning to bikes for the first time since childhood. For Aliya Memon, 30, who climbed on a bike last September after a 15-year gap, the memory of how to ride immediately came back. “I started cycling again because it is an emotional outlet,” she says. “You release endorphins when you cycle. You have a sense of achievement.”

The Lyari girls cycle past graffiti. Photograph: Zulekha Dawood/Lyari Girls Cafe

But it can be difficult in a frenetic city of 15 million. As Karachi has grown from a fishing village to Pakistan’s first capital and now its economic hub, traffic and commute times have increased. Transportation options are dismal.

On the city’s dilapidated buses, women squeeze into a cramped reserved section with only a few seats. Sexual harassment is rife onboard and at bus stops, and the limited service forces passengers to walk long distances. For women, the only other options are to share a rickshaw or taxi – an often expensive proposition – or depend on male relatives to drive them to work and school.

Cycling could be one way for women to gain personal and economic freedom but it will be a long and bumpy road ahead – quite literally, given Karachi’s potholed streets. For most, cycling is just a recreational weekend activity, not a way to commute. Karachi has no bike paths or cycle parking, and the motor traffic is chaotic. The few cyclists on the roads are mostly daily-wage earners using basic bikes. While some people ride bikes to complete quick errands, the fear of being robbed deters many from cycling to work with a laptop, for example.

In addition to security risks, women have to contend with social acceptance. Women ride side-saddle on motorcycles and are often told to stop cycling when they’re teenagers. Faiza Hasan Rizvi, a 32-year-old cyclist who rides with GG Riders, says women are dissuaded by cultural norms and even by their families. “We’ve been brainwashed [to think] that we can’t do it,” says Rizvi. “For women my age there’s no imagination to do anything.”

‘We’ve been brainwashed [to think] that we can’t do it’ ... Faiza Hasan Rizvi. Photograph: Faiza Hasan Rizvi

Zulekha Dawood, the coordinator at Lyari Girls Cafe, first began cycling on her neighbourhood’s uneven roads with another colleague. “It felt good, like we were free,” Dawood says, sitting in the front room of the cafe on a quiet weekday afternoon. The power has gone out, and a loud generator hums in the background. “We faced some resistance [from] the students of the madrassa, some religious people … [but] if you stop a girl’s path in one way, many more ways will open up.”

Deciding there was safety in numbers, they trained indoors for seven months, learning from four women who already knew how to ride a bike. When they had a large enough group, they ventured out on the road.

Habiba Allahdad, 39, a resident of Lyari, was hesitant at first, thinking her weight would be an obstacle. Now she hopes she can one day use a bike to run errands: “I want to show people in the neighbourhood that the girls who have this desire in their heart can look at me and do this too.”

While there is safety in numbers, many cycling groups rely on support cars and mechanics. Women don’t ride alone on main roads. “When you’re on a bike, you feel a certain sense of freedom,” says Sadaf Furqan, 42, on a Saturday morning after completing a 25km ride with the Cycologists group. But cycling unaccompanied, she says, isn’t an option. “I long for the day I can take my bike and go out on my own but I have to bank on other people to ride. If I go on a long ride, there have to be at least five men in the group.”

Two of the Lyari girls pause for a moment. Photograph: Zulekha Dawood/Lyari Girls Cafe

Nearly every woman interviewed recounts catcalls, stares and harassment. “People think we’ve come from some other planet,” Dawood says.

“No matter how progressive people become, if someone is trying something new they cannot tolerate it,” Memon adds. “The ego of our men is very fragile.”

Conservatives in Pakistan have been riled by female cyclists. In Peshawar, religious-political parties objected to a cycling rally for women organised by Zamung Jwandun (Our Youth), a local NGO. Wafa Wazir, the group’s 23-year-old founder, had been inspired by accounts of women who wanted to drive rickshaws or ride bikes. As opposition grew, however, Wazir was forced to put the plan on hold, citing the safety of participants.

That hasn’t deterred the girls of Lyari, nor any of the women who’ve found cycling offers a release from the stresses of life in Karachi.

“They want to scare girls so they don’t go out to cycle, and neither do others,” says Allahdad. “Because if girls ride a bicycle then they can also ride a motorcycle. I think it’s also jealousy at seeing girls getting ahead.”

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter