PORTLAND – When Kristin Barry left her house Sunday morning, she had a little extra motivation to win the 81st running of the Boys & Girls Club Patriots Day 5-miler.

The race featured the Haley Challenge, a $1,000 award to the first male and female runners who beat predetermined times. The male runner had to finish under 24 minutes, 30 seconds; the female had to break 28 minutes.

Barry, of Scarborough, just made the cut, sneaking in at 27:57 for the second-fastest women’s time in race history. Running at a pace of 5:36 per mile pace, she was the first female and eighth finisher overall.

Patrick Tarpy of Yarmouth was the race winner with a time of 23:35, 2 seconds off the race record, topping the field of 388 and winning the male Haley Challenge.

“I knew based on previous races this year it would be close,” Barry said. “Literally, this morning my washing machine and coffee maker broke, so I thought it would be great if I could get under that time barrier.”

Barry broke a personal record at the New York City Half Marathon three weeks ago and qualified for the Olympic trials in January. But despite her recent success, she was still unsure of what Sunday’s run would bring.

“I knew I was close to (the Haley Challenge time),” she said, “but I wasn’t sure. This isn’t an easy course for me. It never has been.”

Tarpy, who last competed in the race in the 1990s, also thought the race would bring a strong level of competition and knew the importance of breaking away early. He quickly separated with fellow front-runners Louie Luchini of Ellsworth, Justin Lutz of Framingham, Mass., and Curtis Wheeler of Buxton.

“I knew it would be relatively competitive and if we all ran well, we would definitely break that 24:30 time,” he said. “When Louie is at his best, he is at least as good as or better than me, probably better than me.”

Tarpy began to break away from the lead pack at Mile 2 and took a 300-yard lead at Mile 4. Luchini (24:11) finished second, with Lutz (24:33) third and Wheeler (24:51) fourth.

Abby Mahoney of Holyoke, Mass., was the second female finisher, 22nd overall at 31:12. Gabrielle Cyr of Buxton was third, 13 seconds after Mahoney.

“It was great overall,” said Tony Myatt, one of the race directors. “We have people from all ages and all generations come down for it. We would like to get our numbers up a bit more, but it was good, an overall success.”

The race was moved two years ago to the Sunday before Patriots Day. Despite a dreary forecast, rain showers held off for the runners, who even saw a few peeks of sunshine.

Barry plans to race again May 9 in the Portland Sea Dogs Mother’s Day 5K and will join Tarpy at the Beach to Beacon 10K on Aug. 7.

While Tarpy enjoyed the win, he also was glad to help out a good cause. Money raised goes to Boys & Girls Club scholarships for area high school students.

“I’ll do any local race if it’s a good setup, good course or for a good cause,” he said. “Most races are for some sort of charity, so anything you can do to get more people to come helps.”