It was there for the taking as the Foxboro High football team traveled to Canton on Friday.

The Warriors had three different possessions while trailing by six points in the fourth quarter. And the defense helped with a pair of fourth-quarter fumbles to grant possession twice in the red zone.

In the end, however, the Warriors could not make up for a two-possession deficit heading into the fourth quarter and were handed a 26-20 Hockomock League loss to the unbeaten Bulldogs.

“We blew some opportunities,” Foxboro coach Jack Martinelli said of the 17-14 and 26-20 deficits. “We had three possessions in the last three minutes and came up empty.”

Foxboro had its last chance with just over a minute left, but was not able to get anything on offense as four incomplete passes resulted in turning the ball over on downs as Canton.

Foxboro quarterback Shayne Kerrirgan accounted for three touchdowns in the game, his last of which went for a run 6-yard run with just under 11 minutes remaining. It cut the Foxboro deficit to six points again, after trailing 20-14 at the half.

Elijah Lewis and Michael Norvich each recovered fourth-quarter fumbles for the Warrior defense, but Foxboro couldn’t turn the turnovers into points. The second fumble recovered (Norvich) led to a Foxboro turnover of their own.

Trailing by six, the ground game featuring Kerrigan (12 carries, 75 yards) and Chris McNamara set up Foxboro at the Canton 25 yard line. And following a Canton penalty, the Warriors had the ball with 1stand 10 from the Canton 12. Foxboro had a pair of incomplete passes and a pair of runs that went for a mere two yards to end the drive.

Kerrigan accounted for his first touchdown as he connected with Ryan Hughes for a 46-yard score. His second touchdown went for an 11-yard run to cut the Foxboro deficit to three points in the first half.

While the Foxboro defense gave up some big plays through the air early on, they buckled down during much of the second half.

Foxboro (2-2) will host Stoughton on Friday.

Sean McGuire is the sports editor of the Foxboro Reporter and can be followed on Twitter at @BySeanMcGuire.