A few days before this year’s Los Angeles Marathon, the fastest local competitor wasn’t even sure he was going to participate.

Samuel Bradbury hadn’t done much distance running over the last two years due to injuries and medical setbacks, and he was nowhere near top shape. But he was inspired by the prospect of completing a race that would finish just blocks from where he lives, so he gave it a go.

Bradbury was still plenty fast Sunday. He finished in 2 hours 44 minutes 24 seconds, clocking the best time of the hundreds of Santa Monica residents who participated in the 26.2-mile journey from Dodger Stadium to Ocean Avenue.

The 35-year-old placed 46th overall in a competition won by Kenyan runner Weldon Kirui, whose unofficial time of 2:13.06 made him the fastest competitor in an event featuring thousands of entrants.

“I was just seeing if I could do it,” Bradbury said Monday. “The injuries got to the point to where I didn’t know if I’d be able to do it again. … The race went well.”

Bradbury’s time put him in elite company. The only other Santa Monican to finish in the top 100 overall was Ben Reichardt, 35, who was 52nd with a time of 2:44.56.

The fastest local woman in the race was Rachel Miura, who clocked in at 2:54.37. The 25-year-old was 119th overall and seventh among all female participants, who were led by 33-year-old race champion Nataliya Lehonkova (2:30.40).

Miura, a New York native who was a member of the track and field program at Binghamton University, moved to California a year after graduating with a degree in mechanical engineering. Now a designer for a solar company, Miura once biked across the country as an advocate for affordable housing.

Miura was followed on the leaderboard of Santa Monica women by Dina Kitayama and Erika Aklufi. Kitayama, 26, crossed the finish line in 3:01.53. Aklufi, 39, a Santa Monica police sergeant and the fastest local female competitor in last year’s LA Marathon, clocked in at 3:06.30.

“It’s a chance to go from home to work with no traffic,” said Aklufi, a 9-year veteran of the local police department who lives in Downtown Los Angeles. “You’re a tourist in your own city, and you get to see L.A. at a different speed.”

A longtime swimmer who took up distance running after college, Aklufi has run about a dozen marathons, including four in Los Angeles. This year, she had a work shift the evening after the race.

“Getting to watch the city transform overnight into this running wonderland, it’s fun to see our city rally around something I care about so much,” she said. “It’s special to be a part of that.”

Sunday was also a landmark day for Santa Monica resident Julie Weiss, 45, who completed her 100th marathon in 5:40:48. The self-described “Marathon Goddess,” who once ran 52 marathons in as many weeks, uses her races to raise money for pancreatic cancer research.

Local resident Tracie Garacochea, 55, was 14th among wheelchair competitors with a time of 1:58.35.

For Bradbury, who has run about 20 marathons, participating in this year’s race across Los Angeles didn’t seem realistic. A couple years ago he had surgery to repair damaged ankle ligaments, but infections forced him to undergo additional operations.

“It felt good releasing a lot of mental frustration,” he said of Sunday’s race. “It was a good day.”

Bradbury didn’t start running until after college and said it started as a social activity with friends. About four years ago he moved to Santa Monica, where he does marketing for Red Bull energy drink.

Bradbury ran his first LA Marathon in 2013, but he wasn’t able to enter the race the next two years due to injuries. Leading up to this year’s event, he felt as though the signs about marathon road closures in Santa Monica were goading him to participate.

“I just decided I had to do it,” he said.