Image copyright Dayla Soul

Since 1999, the world's elite big-wave surfers have battled it out at an event known as the Mount Everest of surf competitions - at Mavericks in California. Until this year, female surfers were banned from taking part. But a small group of determined women have fought their way in.

The first time Bianca Valenti surfed a 6m (20ft) wave, the ferocity of the breaking water sucked her down to the ocean bed. There, it tossed and spun her body over and over until everything went black and she began convulsing from lack of oxygen.

Badly shaken, the 18-year-old swam back to shore at Ocean Beach, next to San Francisco's Golden Gate Park, and swore she would learn to conquer these giant waves.

Valenti, now 31, grew up in southern California where she fell in love with surfing at the age of seven and became a precocious champion - competing against boys and girls and travelling around the world for tournaments.

But the breaks - where a wave that can be surfed is formed - in southern California are small and the water warm. The biggest injury Valenti was likely to face there was a cut from her board's fins or a broken rib from colliding with other surfers.

Northern California is a different matter.

A few miles south of Ocean Beach is a surf break regarded as one of the most challenging on the planet - Mavericks.

Image copyright Alamy Image caption Bianca Valenti competes in Biarritz, France, in 2006

Long considered too dangerous to ride, Mavericks has become known as the fiercest and deadliest big-wave spot in the world. It's where the world's top big-wave surfers compete every winter to prove their skill and bravery.

But until now it's been a competition for men only.

Image copyright Alamy Image caption Mavericks: "The fiercest wave spot in the world"

Mavericks' potential as a surf break was recognised in the late 1960s, but surfers gave its treacherous waters a wide berth until a local teenager, Jeff Clark, began paddling out in the mid-1970s.

It then took 15 years for Clark to persuade anyone to join him in the freezing water and for the news to reach the big-wave surfing community.

The break is formed by an unusually deep underwater geological formation that forces swells from winter storms into crests higher than four-storey buildings.

Just at the point they break is an underwater labyrinth of jagged rock known as the "boneyard", adding another element of danger. And as if that wasn't enough, the break is situated in a hunting ground for Great White sharks - an area known at the Red Triangle.

"It's so scary at first," says Valenti.

"You see these big waves coming at you and you want to run from them."

When surfers finally started coming to Mavericks, it quickly became celebrated - but tragedy followed too. In 1994, one of the world's top competitors, Hawaiian champion Mark Foo, drowned on his first Mavericks outing after becoming trapped in the underwater rocks.

Foo's death cemented Mavericks' reputation.

"We knew Mavericks was dangerous and we knew it could take us," said Clark in a 2015 BBC interview.

"Mark Foo had said: 'You have to be willing to pay the ultimate price for the ultimate thrill.'"

Image copyright Getty Images

In the late 1990s, Jeff Clark co-founded The Titans of Mavericks - an invitation-only competition for the world's top big-wave surfers.

Posters for the first event in 1999 were emblazoned with the title, Men Who Ride Mountains. The conditions were so punishing it was hard enough for the male competitors to qualify - it was inconceivable to the organisers that a woman might also want to be in the running.

But a week after the competition was over, a lone female surfer, Sarah Gerhardt, proved everyone wrong.

Alongside her surfer husband, the PhD student from California paddled out past the break and began catching waves.

"It's got to be the way a glider feels," says Gerhardt, describing the experience of dropping off the top of a vast wave.

"Just barely making contact with the Earth. It feels like flying. It's this liberating experience."

Media playback is unsupported on your device Media caption Sarah Gerhardt describes surfing at Mavericks for the first time

Within years, other women began to join Gerhardt at Mavericks. One of them was the 25-year-old Bianca Valenti.

"You're dealing with football-pitch lengths of water moving so there's a lot of tactics involved," says Valenti.

"Part of it is studying and learning and putting in the time. Another part is going with your instincts about where the wave is going to come next, what the set is doing and how the swell is moving."

Paddling out through the tempestuous waters to reach Mavericks demands tremendous upper-body strength, so Valenti focused her training on cardio and weights.

To cope with the speed of the waves, she emphasised lateral movements and explosive bursts of power.

Most importantly, she practised holding her breath for four minutes - about eight times longer than most ordinary people can.

"You can be held down for a really long time," says Valenti.

Image copyright Dayla Soul

"Once you go under 33ft (10m), the pressure changes. It can take only a few seconds to get down there, but your diaphragm compresses and all of a sudden you feel the urge to breathe.

"You really have the same amount of air that you had at the surface. So you have to tell yourself: 'I have enough air, I have enough down here.'"

Underpinning the physical training is what surfers often refer to as the spiritual side of riding waves - being focused on the moment, accepting the fear and appreciating the experience.

"I've been really scared, but not to the point of panicking," says Valenti.

"What the wipeouts do is make you feel the greater power of the universe. It's a reminder that you're still little, and it's so humbling.

"For me, the wipeouts are positive."

A decade after Sarah Gerhardt first took on Mavericks, a number of proficient and competitive female surfers were regularly surfing the break.

Although they did not have the power of the elite male surfers, the skills of women like Savannah Shaughnessy, Paige Alms, Keala Kennelly, Jamilah Star, Andrea Moller, Emily Erickson, Polly Poline and Bianca Valenti were beginning to edge closer.

But there were still no women's big-wave surf events for them to compete in.

The women believed this was partly because the image promoted by big surf brands - of lithe, young, blonde, thong-bikini-clad surf babes - was nothing like the reality of big-wave surfing.

Media playback is unsupported on your device Media caption Bianca Valenti observed from a GoPro camera on her board

To cope with the freezing water temperatures, big-wave surfers wear full wetsuits and hoods, their bodies are strong and muscular, as opposed to model-thin and their faces are often raw from the cold, their noses streaming with snot.

In the 2017 documentary It Ain't Pretty, by Californian film-maker Dayla Soul, Valenti and her fellow surfers discuss wanting to be taken seriously as athletes and not portrayed as pin-ups to sell surf clothes.

"I realised in college that unless you were a model, you weren't going to get sponsorship," says Valenti, who works as a wine expert in her family restaurant to support herself.

"There are people like me who are past the point of being angry… But it's frustrating, it's upsetting and it gives you body-image issues."

But by 2014 public interest in female big-wave surfers was beginning to pick up. That year, the first Big Wave World Tour women's event was held at Nelscott Reef in Oregon. Valenti won it.

"The viewership was amazing," she says.

"So we said: 'Let's do a woman's event at Mavericks.'"

Shortly afterwards, Valenti heard Jeff Clark being interviewed on a local radio phone-in programme. She called in to ask how she could get the conversation going about introducing a women's heat at Titans of Mavericks.

"We look forward to evolving what Mavericks has always been, and for everyone to experience it," replied Clark. But his words were not followed up with action.

Unknown to Valenti, though, a member of the local government harbour commission had also been wondering how she could support female surfers.

Sabrina Brennan had moved to the area in 1999 - the same year posters were celebrating the "Men Who Ride Mountains".

Image copyright Sabrina Brennan

"I thought this slogan really doesn't leave much of a door open. It sounds like it's only men who can ride mountains, and don't even bother if you're a woman," she says.

"But I heard there were women surfing out there and I had seen one in the parking lot."

In 2015, Brennan seized a chance to change this.

Brennan's local harbour commission had only recently granted a five-year permit for Titans of Mavericks to be held without women. In November 2015, though, she heard the event was also being reviewed for a permit by the state Californian Coastal Commission.

At first her cause was supported by a local NGO, but they dropped out at the last minute, and Brennan had to decide whether to lobby the commission alone.

"I woke up at 2am and thought: I have to do this," she says.

"So I started working on a presentation. I searched the internet for names of women who surf big waves and finally came up with a list.

"I had no clue about any of these people - I wasn't even a fan."

Media playback is unsupported on your device Media caption Bianca Valenti surfs at Mavericks

Brennan's presentation argued that if a permit was given as things stood, women would be excluded from coastal access, and the commissioners agreed, demanding that the organisers of Titans of Mavericks should come back within a year with a plan to include women.

But Titans continued to hold out against organising a women's heat.

"My understanding of what the Coastal Commission wants is more women involved in Mavericks," Clark told CBS news in February 2016.

"We've had women judges, we've had women in our water patrol and water rescue," he said.

Women were just not good enough for the main event, he insisted.

"It's not a gender thing, it's a performance thing," he said. "Women just aren't there yet."

More from the BBC

Image copyright Getty Images

When a scene from Apocalypse Now was shot on an obscure beach in the Philippines in the late 70s, little did the film-makers know they were giving birth to the country's surfing culture.

How Apocalypse Now inspired Filipino surfers (April 2013)

But the women surfers weren't asking to take part in the main competition.

"We all, as human beings, need a venue to compete against our peers: women against women, men against men," wrote prize-winning surfer Keala Kennelly in a 2016 editorial for the surfing site inertia.com.

"I cannot see why big-wave surfing should compromise these centuries-long standards of competition. Do men compete against women in boxing, golf, tennis, or basketball?... The answer is no."

Valenti guesses that the organisers were scared to have women at Mavericks because of "the traditional patriarchal role of wanting to protect women and not embracing us to make our own choices".

"But they would spin it around on us, saying: 'If you don't think women are good enough to compete against men, then you don't really believe in women,'" she adds.

Valenti realised in order to win the fight, the female surfers would need to get organised. They formed a lobbying group - the Committee for Equity in Women's Surfing - and together with Brennan wrote a new proposal for the next Coastal Commission meeting demanding a women's heat.

In November 2016, the commission voted unanimously to support the women.

Almost immediately, Titans announced they would be holding a women's one-hour heat in their 2017 event. The prize money was announced at $30,000 (£23,000) - far short of the $120,000 given to the male winner - and the heat would be for only six surfers, rather than the 24 in the main competition.

After years of struggle, women surfers had achieved their goal. But then suddenly, in February this year, the organisers of Titans of Mavericks declared bankruptcy.

It's unclear who will take over, but the principle that women must be allowed to participate has been established.

"The Coastal Commission is going to stand behind including women, so that's good news," says Brennan.

"No matter who runs the event in the future, women are going to have to be included."

Image copyright Getty Images Image caption Hawaii, November 2016: Hawaiian surfer Paige Alms at the first ever Women's Big Wave Tour event

Even without the chance to compete in Titans of Mavericks this year, the sisterhood of female big-wave surfers feel the tide has begun to turn in their favour.

In April 2016, the World Surf League announced the first ever Women's Big Wave World Tour - the Peahi Women's Challenge - which was held in November that year at the big-wave venue, Jaws, in Hawaii.

"We saw a tremendous increase in audience last year with the performances of both the men and women at the Peahi Challenge," says World Surf League spokesman, Dave Prodhan.

Valenti believes this is a strong indication that female big wave surfing has a commercial future.

Most of all, she's grateful that finally the sport she's devoted her life to is getting the recognition and support it deserves.

"What keeps me coming back is that it's never the same," says Valenti.

"You're out there in the middle of the ocean and it's that feeling of when you go up a roller-coaster - that tick, tick, tick - and then you drop."

"There are a million things you think about - safety, other people, rocks, sharks. But, all of a sudden, when that wave approaches, everything goes silent and there's only one thing you think about - trying to make that wave."

Join the conversation - find us on Facebook, Instagram, Snapchat and Twitter.