FOXBOROUGH, Mass. — Sam Howell was kicking himself.

The Commanders quarterback was leaving the field minutes after throwing a red-zone interception to Patriots safety Kyle Dugger that negated his team’s chance to take a lead into halftime.

“That’s probably one of the worst plays I’ve made in my football career,” Howell said.

Coach Ron Rivera noticed the agitation on Howell’s face and had a quick word with him in the team’s tunnel.

The Baltimore Banner thanks its sponsors. Become one.

“He’s resilient,” Rivera said. “I knew he was going to get over it quickly and come out and play.”

He was right. And, with a little help from their defense, the Commanders picked up one of their biggest victories of the season.

Howell passed for 325 yards and a game-tying touchdown, and Jartavius Martin had a late interception to help Washington hold off New England 20-17 on Sunday.

It marked the first time in Howell’s career he eclipsed 300 yards passing in consecutive games and gave the Commanders their first victory in New England since 1996. It also snapped a four-game overall losing streak to the Patriots.

Washington (4-5) turned it over twice but wore down the Patriots’ defense by going 9-for-17 on third down. Brian Robinson added a rushing touchdown to help the Commanders end a two-game skid.

The Baltimore Banner thanks its sponsors. Become one.

New England dropped to 2-7 for the first time since Bill Belichick’s first season as coach in 2000. The Patriots are 0-5 in nondivision games, the only team in the NFL without a win outside of their division.

“The results aren’t there right now. It stinks. And there’s no excuses,” quarterback Mac Jones said.

Trailing 20-17, New England had a chance. The Patriots inched down the field and converted a fourth-and-4 to keep their hopes alive. But, two plays later with the ball on the Commanders’ 41, Jones’ pass intended for JuJu Smith-Schuster was intercepted by Martin — sealing the win for Washington.

The Patriots entered the day thin at receiver with Kendrick Bourne out with a season-ending knee injury and DeVante Parker sidelined with a concussion. Jones did his best to make it work, completing 24 of 44 passes for 220 yards and a touchdown.

It helped erase an early 10-0 lead by the Commanders, who were playing their first game since trading top pass rushers Montez Sweat and Chase Young.

The Baltimore Banner thanks its sponsors. Become one.

New England got back into the game thanks to a 35-second span that included a forced fumble and a 14-yard touchdown pass from Jones to Hunter Henry.

The Patriots took a 14-10 lead a series later via a 64-yard TD run by Rhamondre Stevenson.

New England added a field goal early in the third, but Washington responded with a seven-play, 75-yard drive capped by a 33-yard touchdown pass from Howell to Jahan Dotson to tie the game.

“We knew it would be one on one. Cover 0, there’s nobody behind him,” Howell said. “So I just tried to throw it out there and let him go get it. He did.”

Washington then took a 20-17 lead in the third quarter on Joey Slye’s 30-yard field goal.

The Baltimore Banner thanks its sponsors. Become one.

That remained the score in the fourth quarter when the Commanders took over on their own 5-yard line with 5:04 left following a Patriots punt.

The Commanders picked up a first down and burned some clock before punting with 2:29 remaining. But New England’s Mack Wilson was offsides on the play, resulting in a first down for Washington.

The Commanders ran three more plays before punting again, pinning the Patriots at their 10 to start their final drive after a holding penalty.