It wasn’t pretty and it certainly wasn’t what the crowd at Leo Shields Memorial Field expected, but the No. 1 Barnstable Red Raiders delivered a 19-14 victory over visiting New Bedford Friday night.

Barnstable (5-0), which scored 145 points in its first three games of the season, has put up 32 points combined the past two games. The Red Raiders took down No. 2 Everett last week in a 13-7 double-overtime victory.

“I think [New Bedford] just had a good game plan against us and it was tough for us to move the ball offensively,” Barnstable coach Chris Whidden said. “Our emotions were the same and our kids came prepared, but New Bedford came prepared, too. They played tough.”

Advertisement - Continue Reading Below

The Whalers (2-3), who beat Barnstable last year, 31-17, had fans of both teams on the edge of their seats in the final minutes. New Bedford scored on a 7-yard touchdown pass from Mike Rapoza to Mike Lajoie at the 2:48 mark in the fourth, making it 19-14. They regained possession after Nick Peabody failed to connect on a fourth-and-14 pass and started their final drive from the Barnstable 34 with 1:08 on the clock.

It didn’t take long for Barnstable to get the ball back, though. Tedaro France picked off a Rapoza pass at midfield and returned it to the New Bedford 43, where Barnstable ran out the little time that remained.

“We became one-dimensional. We’re not going to win a lot of games if we’re one-dimensional,” Whidden said.

Barnstable opened the game with a 65-yard touchdown drive, capped by a 34-yard TD pass from Peabody to Dylan Morris. Terrence Mudie added the extra point. Mudie, who also plays running back and linebacker, suffered a right knee injury minutes later and spent the remainder of the game on crutches.

Barnstable scored again with 3:53 left in the first half when France caught a Peabdoy bomb for a 94-yard score. The Red Raiders failed on the pass conversion and led, 13-0. Peabody completed 10 of 23 passes for 298 yards, 3 touchdowns, and 1 interception.

New Bedford answered with a 20-yard touchdown pass from Rapoza (164 all-purpose yards) to Lajoie (50 yards receiving). Rapoza added the extra point to cut the deficit to 6 heading into halftime.

After a quiet third quarter, Barnstable scored its final touchdown with 3:36 left in the fourth. France caught another long ball from Peabody, the 59-yard connection putting the Red Raiders up, 19-7, after the conversion attempt failed.

“We gave up a couple big plays,” New Bedford coach Dennis Golden said. “They’re a high-powered offense. Our effort was there. We’re not looking to come close, we’re looking to get over the hump.”

Everett 51, Cambridge 30 — Everett is back on track — sort of. The second-ranked Tide needed a 70-yard interception return by senior defensive back Brendan LaRosa to squash a potential go-ahead drive by the Falcons, who trailed, 36-30, before the interception. After recovering the ensuing onside kick, the Tide added another touchdown — a 10-yard run from senior Jakarrie Washington, who scored five times for Everett.

East Bridgewater 39, Hull 26 — Andrew Benson scored five touchdowns — three of which were rushes of at least 40 yards — and ran for 294 yards on 17 carries.

Franklin 20, North Attleborough 13 — Chris Johnson blocked a punt with 38 seconds left to set up a 49-yard go-ahead drive that ended with Nick Zucco hooking up with Robert Dellorco for a 19-yard score.

Sharon 21, Canton 14 — Adam Banks caught the winning touchdown pass from Sean O’Neil in overtime to boost Sharon to 5-0 for the first time since 1998. Banks also recovered a fumble and an onside kick.

Natick 42, Dedham 7 — Troy Flutie went 11 for 15 for 280 yards and four touchdowns — all in the first half — for the N o. 8 Red Hawks.

Brockton 33, Fitchburg 6 — Aaron LeClair, Ricardo Calixte, and Micah Morel combined for 228 rushing yards and four touchdowns to lead the No. 12 Boxers (3-2).

Lincoln-Sudbury 24, Waltham 0 — The 18th-ranked Warriors (5-0) had five interceptions to keep the visiting Hawks off the board.

Blue Hills 36, South Boston 12 — Running back Vincent Burton scored four touchdowns for the Warriors, and brought his career rushing total to 4,188 yards in the win.

Latin Academy 14, Burke 0 — Junior Kyle Dance completed 8 of 10 passes for 110 yards and two touchdowns as the Dragons improved to 3-2.

Dorchester 32, Charlestown 0 — The Bears extended their win streak to five behind Dale Cooper, who ran for a touchdown and returned a kickoff for another.

Bedford 41, Somerville 40 — It took overtime, but the Buccaneers tipped the Highlanders behind Olan Abner (175 yards, 34 carries, winning TD).

Winthrop 9, Arlington Catholic 7 — Ruben Powell tied the game after scoring from 3 yards, and the Vikings forced a winning safety.

Needham 33, Brookline 6 — Michael Panepinto ran for 195 yards and three touchdowns on 25 carries for the Rockets.