In this undated image made from a video provided by...

In this undated image made from a video provided by Breakwater Studios shows Mary McGee during an interview. Credit: AP

GARDNERVILLE, Nev. — Mary McGee, a female racing pioneer and subject profiled in an Oscar-contending documentary “Motorcycle Mary,” has died, her family said. She was 87.

“McGee’s unparalleled achievements in off-road racing and motorcycle racing have inspired generations of athletes that followed in her footsteps,” her family said in a statement.

The family said McGee died of complications from a stroke at her home in Gardnerville, Nevada, on Wednesday, the day before the release of the short documentary “Motorcycle Mary” on ESPN’s YouTube channel. Seven-time Formula 1 champion Lewis Hamilton was an executive producer on the film, which became available globally on Thursday. Its premiere was at the Tribeca Festival in June.

“Mary embodied resilience, grace, and optimism,” McGee’s family wrote on social media. “She was a historic athlete and a motorsports pioneer who embraced life’s challenges, cared deeply for others, and made time to brighten the lives of those around her. While we are deeply saddened by this loss, we are comforted knowing that her light will continue to shine in everyone she touched.”

McGee had an accomplished racing resume, first in auto racing and later in motorcycle racing. She became the first person — man or woman — to complete the grueling Baja 500 off-road race in Mexico solo, which she did in 1975.

The film about her was directed by Haley Watson. Two-time Oscar winner Ben Proudfoot also was an executive producer.

“I’m deeply saddened by this news, but I am comforted to know that Mary was surrounded by friends and family at the time of her passing," Watson said. “In early 2022, I was researching stories when I came across Mary’s. That discovery marked the tipping point into uncovering a much larger and truly incredible career in motorsports and life journey.”

Shortly after her family announced her death, Hamilton paid tribute on his Instagram account: “I’m deeply saddened to hear that Mary McGee, the first woman to road race motorcycles in the U.S and the first person to solo the Baja 500 has passed on," Hamilton wrote. “My condolences to her family and everyone who she’s inspired. Her legacy will live on as a trailblazer in the world of motorsports and beyond.”

Born in Juneau, Alaska, during World War II, McGee and her older brother were sent to Iowa to live with their grandparents. Her brother became a race car driver and encouraged his sister to take up the sport, even though it was almost unprecedented for women at that time.

Racing team owner Vasek Polak persuaded McGee to drive a Porsche Spyder, and she won races. Polak later persuaded her to try motorcycle racing and she also excelled.

Steve McQueen, the late actor and racing enthusiast, was the one who persuaded McGee to take part in the Baja 500.

McGee was the first woman to race motocross in the United States, the first to compete in an international motocross competition and the first to receive sponsorships from major brands.

She was one of the most influential women in the history of motorsports and known for her mentorship of other women in racing.

McGee was inducted into the AMA Motorcycle Hall of Fame in 2018.