RIO DE JANEIRO -- Catharine Pendrel of Kamloops, B.C., overcame an early crash and equipment problems to capture an Olympic bronze medal in mountain biking.

The 35-year-old, who edged teammate Emily Batty for the podium spot, didn't let a bad start derail her.

"At the beginning of the race with getting in a crash at the start and then my shifting stopped working and it was just like: 'Everything is going wrong.' I'm used to having bad starts, luckily, and I know I can work through a field. We had prepared for every scenario.

"I knew that I could close a gap and that's what I set about doing today."

Batty, from Brooklin, Ont., finished fourth.

"It was best-case scenario coming into the finish because I knew if I wasn't bronze, Emily would be," Pendrel said. "I almost took myself out of bronze at the finish. That was a little too exciting. I'm just so happy it all came together in the end."

Jenny Rissveds of Sweden won the gold in 1:30:15 while Maja Wloszczowska took silver in 1:30:52 while Pendral was 1:26 back in 1:31:41. Batty was just two seconds behind her teammate.

Pendrel was a strong medal contender heading into the 2012 London Olympics as the reigning world champion, but wound up a disappointing ninth.

That result came on the heels of a fourth-place finish in Beijing four years earlier. She bounced back by winning gold ahead of Batty at the 2014 Commonwealth Games before taking silver behind Batty at the Pan Am Games last summer in Toronto.

"It's kind of unbelievable. I thought before the race I still would be happy with my career if I didn't have an Olympic medal, but I'm sure happy that I do," she said. "It's a pretty special feeling. I worked so hard for this for so many with my coach and my teams and my husband. It's amazing that it came together."

Pendrel also won gold at the 2014 worlds.

Batty raced to a 24th-place finish at the 2012 Olympics in London despite breaking her collarbone in training a few days before the event.

The 28-year-old was third at the 2016 world championships after taking gold at last summer's Pan Am Games and silver at the 2014 Commonwealth Games.

"After London with a broken collarbone, to being 10 metres from a bronze medal, it is a heartbreak," said Batty. "My preparation was amazing. I raced clean and I rode incredibly strong and just missed a medal by a couple of bike lengths so I have some mixed emotions."

The Olympic Mountain Bike Center in Rio's Deodoro district was surrounded by a heavy military presence on Saturday, with armed soldiers keeping a watchful eye on spectators as they entered the venue in the heart of this gritty neighbourhood.