FREEPORT — Before hamburgers or hot dogs, and before watching fireworks, Freeport residents Nicky and Bethanie Knighton hit the ground running by taking part in the 40th annual L.L. Bean 4th of July 10K on Tuesday morning.

Nicky has run the event with her daughter, Bethanie, each of the last eight years, and Tuesday they joined more than 1,400 other runners in winding through the streets of Freeport before crossing the finish line together in front of the L.L. Bean building.

“We’ve been trying to run this together every year, but every year either she kicks my butt or I kick hers,” said Nicky Knighton. “This is the first year we’ve been able to finish it together, and it’s kind of a dream come true. This event is awesome, we really look forward to it.”

Ryan Smith, of Farmington, won the event – finishing in 32:31 and coming in 25 seconds ahead of Portland’s Sam Seekins. Chris Harmon, Michael Gordon and Spencer McElwain – all of Portland – rounded out the top five.

Falmouth’s Sheri Piers was the top female finisher, crossing the finish line in 37:54. Erin Lane, of Contoocook, New Hampshire, was the second female finisher and was followed by New York City resident Christina Berkow, Aly Ursiny of Charlestown, Massachusetts, and Brunswick’s Tessa Cassidy.

Patrick Tarpy set the course record for the event in 2010 (30:52).

The race, which kicked off a full day of events at L.L. Bean that included an outdoor concert and later a fireworks display, is one that draws people both locally and beyond.

“I grew up in Western Mass., and the local feel to this race definitely brought me in,” said Thomas Dal Molin, who currently lives in Portland. “L.L. Bean and Freeport did an amazing job with it. This is such a great event.”

“It’s a great way to get people together,” said Nicky Knighton. “It’s not just people from our town that run, it’s people from all over. It’s a uniting event and a really great way to start the Fourth of July. I always feel so patriotic when they sing the national anthem, and I feel town pride and national pride and family pride.”

After crossing the finish line under Tuesday’s beating sun, runners were able to turn their attention to the rest of the day.

“Being on the fourth makes it pretty special,” said Kaitlyn Hall, who lives in Portland with Dal Molin, her fiancé. “We’re big family people and this a fun event that gets people together. The race has some amazing runners, and it really pushes you. It’s nice to start the day running, because you really deserve that food, and water and beer the rest of the day. It’s been a great weekend and we’re just excited to relax and enjoy the rest of the fourth.”