According to police in Greenville, North Carolina, X Games biker Dave Mirra has died at the age of 41 after a self-inflicted gunshot wound. (1:14)

Dave Mirra, the versatile BMX freestyle rider who owned the most X Games medals in history through the summer of 2013, died Thursday of an apparent self-inflicted gunshot wound, according to police in Greenville, North Carolina.

Authorities said they responded to an apparent suicide and discovered his body in a truck.

Mirra, 41, was married with two children. He had been visiting friends in the area, officials said.

On Friday, Mirra's agent and longtime family friend Steve Astephen released a statement on behalf of Mirra's family.

"Dave's wife and family are shocked and saddened by the loss of such a remarkable person whom they loved so deeply," the statement read. "Thank you for your kind thoughts and prayers and for respecting their privacy through this difficult time."

Two Instagram posts were published to Mirra's account in the hours before his death, including one featuring his wife, Lauren.

My rock! Thank god A photo posted by Dave Mirra (@davemirra) on Feb 4, 2016 at 11:17am PST

Mirra was an accomplished BMX rider and one of the most decorated athletes in ESPN's X Games history, medaling every year from 1995 to 2008 and winning 14 gold medals. His onetime record of 24 career medals was broken in 2013 by Bob Burnquist.

Mirra, who hosted MTV's "Real World/Road Rules Challenge" and lent his name to two video games, was in exclusive company with Shaun White -- together they were the only athletes to win multiple gold medals over three X Games. Mirra was tied with Tony Hawk and Joe Parsons as the athletes who won 14 X Games medals the fastest. It took them each of them eight appearances to reach the mark.

Hawk tweeted his condolences Thursday night.

Goodbye Dave Mirra, a true pioneer, icon and legend. Thank you for the memories... we are heartbroken. pic.twitter.com/RHpTe7Qzwi — Tony Hawk (@tonyhawk) February 5, 2016

ESPN lauded Mirra's accomplishments and expressed its condolences in a statement released Thursday night.

"Dave Mirra, your courage, determination and natural skill in everything you pursued pushed the world of action sports to become a better place. From all of us at X Games and ESPN, we salute your contributions," the statement said. "Our sincere condolences go out to Dave's wife, Lauren, his daughters Mackenzie and Madison, the BMX community and friends of Dave Mirra."

Mirra was considered a veritable legend in the sport of BMX. His career began in his early teens in his hometown of Chittenango, New York, where he was recognized by the Haro Bikes BMX team during the summer of 1987.

The team riders reported back to the company that Mirra would become an asset to the brand. A week later, Mirra was added to the Haro team as a co-sponsored rider at the age of 13.

Mirra's BMX skills transcended each discipline, and the young rider excelled at both flatland and ramp riding, which is considered a rarity in the sport.

Dave Mirra's onetime record of 24 career X Games medals was broken in 2013 by Bob Burnquist. Gerry Broome/AP Photo

In late 1988, Mirra was recognized by a pioneering group of BMX video producers known as the Plywood Hoods, who took Mirra under their wing and featured him in videos from the "Dorkin' In York" series.

Mark Eaton, creator of the series, posted to his Facebook wall "No words," with a link to Mirra's compiled footage from the "Dorkin' In York" series.

Because of his exposure in the video series, Mirra's BMX riding attracted attention from prospective sponsors such as GT Bicycles and Vision Street Wear, which added Mirra to their team in 1989, when he was 15.

"GT was insane ... bikes in boxes, cranks, leathers, jerseys, everything. ... There was no money, but all the product, and they'd fly me to all the contests," Mirra told The Albion BMX Magazine in April 2013.

Mirra remained with GT Bicycles through 1991 and eventually signed on with Mat Hoffman's new BMX company, Hoffman Bikes, in early 1992.

"Mike Tyson and Michael Jordan came along in that same era, and I used to compare Mat Hoffman to those guys," Mirra said in a 2013 interview.

Mirra turned professional for Hoffman Bikes and pushed BMX to new heights, competing against Hoffman, Jay Miron, Dennis McCoy and other luminary pros of the time in Hoffman's Bicycle Stunt Series.

Mirra's riding pushed him into new territories in the pro class, and his competitive spirit emerged to make him one of the top ramp and street BMX professionals in the early 1990s.

Although BMX was not a lucrative career at the time, Mirra remained with Hoffman Bikes to perform demos on the state fair circuit in Texas. In December 1993, Mirra was struck by a drunken driver and suffered a fractured skull, a blood clot on the brain and a fractured shoulder. After six months, he recovered and signed a new sponsorship deal with Haro Bicycles.

Dave Mirra X-Cellent Medaled in 13 straight competitions to begin his X Games career, a streak that ended in 2001 Competed in BMX events at X Games until 2009, when he earned his 24th and final X Games medal Mirra's 24 X Games medals stood for years as the most in history, before Bob Burnquist surpassed his total in 2013 Mirra is still tied for the second most X Games gold medals in history with 14, one less than Shaun White Mirra and White only athletes in X Games triple-double club (multiple gold medals over three X Games)

A year later, the Extreme Games arrived in Newport, Rhode Island, and Mirra's BMX career was forever changed. He took a silver medal in BMX Vert at the inaugural Extreme Games and changed his approach to his competitive riding.

"I'm going to take it serious, and I'm going to do flawless and continuous runs," Mirra told The Albion BMX Magazine in April 2013.

From there, Mirra's name became synonymous with BMX riding in the X Games. He won gold medal after gold medal, and his riding pushed BMX into the mainstream. Mirra collected sponsorships from brands such as Slim Jim and Adidas, and he racked up a huge collection of BMX magazine covers during the late 1990s.

In 2000, at X Games in San Francisco, Mirra performed the unthinkable when he landed the first double backflip in competition. The move earned him another gold medal and another place in BMX's history books. It was perhaps the most celebrated move of BMX that year.

Mirra's career's upward trajectory continued throughout the early 2000s, when he released a signature shoe with DC Shoes, appeared in many BMX videos, placed well in competitions and released a book of his riding titled "Mirra Images."

In 2004, Mirra took double gold at X Games X in Los Angeles, becoming the most decorated athlete in the history of the X Games. Mirra seemed unstoppable yet again. He left Haro Bikes a year later, started his own bicycle brand, Mirraco, and pursued BMX Big Air in the X Games.

His reign as a pure legend and unstoppable competitive force continued to 2011, when he decided to take a step back and evaluate his career. In his final BMX appearance at X Games in 2008, Mirra earned a bronze medal in BMX Big Air.

"I loved riding and had a pretty big injury in 2010 in Salt Lake City and then just did not have the drive anymore," Mirra said in 2014. "I just did one last event and realized I had to be true to myself. If you don't care if you are first or last, you probably shouldn't be doing it."

Rather than rest on his BMX laurels, Mirra pursued outside interests, such as rally car racing, which he competed in from 2008 to 2013 in X Games. He was a factory driver for Subaru Rally Team USA in 2012 and 2013 and had a career-best finish of fourth place in the Global Rallycross Championship series in 2013.

"Rallycross is a lot of fun, and the risk isn't too high," said Mirra about his auto exploits.

Soon enough, though, Mirra's attention focused on triathlons.

"I'm the kind of guy, if I'm going to do something, I'm going to do it all the way," Mirra said in 2014.

To that end, Mirra began working with former Elite USA National Team coach Cliff English.

"This sport is so easy to access because so many people are willing to help," Mirra said.

Mirra competed in the 2015 Ironman in Lake Placid, New York, and finished 109th with an overall time of 11:00:54.

Recently, Mirra's focus had seemingly turned back to BMX riding. He had constructed a vert ramp in a warehouse in his adopted hometown of Greenville, and his Instagram feed featured iconic photos of his past BMX exploits and magazine photos that Mirra admired as a teenager. In certain circles, there was talk about Mirra making a return appearance to the BMX Vert ramp at X Games Austin 2016.

Upon hearing of his death Thursday, Greenville Mayor Allen Thomas called Mirra "a great friend and wonderful human being who touched the lives of so many around the world with his gift."

"He called Greenville, North Carolina, home and was as humble a guy talking with kids on a street corner about bikes as he was in his element on the world stage," Thomas added. "A young life with so much to offer was taken too soon."

Information from ESPN's Brian Tunney and The Associated Press was used in this report.