Rob Ninkovich and Jermaine Cunningham sacked Mark Sanchez with 7:28 left in overtime, with Ninkovich stripping the quarterback and then falling on the loose ball, the turnover giving the Patriots a 29-26 win Sunday.

In a year in which their three losses have come by a combined 4 points, it was the first time the Patriots have won by such a small margin: their other victories this season have been by 21, 24, and 10 points.

Ninkovich credited Cunningham with getting to Sanchez, and knew as he came flying toward the quarterback that he had a chance to strip him of the ball.

“When he gets in trouble he tries to throw the ball away instead of take a sack,” Ninkovich said, the recovered ball sitting among his cleats and other equipment in his locker.

It was the fourth forced fumble in as many weeks for Ninkovich, who has overcome a bumpy first couple of weeks of the season as he adjusted to the switch from outside linebacker to defensive end.

Sunday was the first overtime game New England has played under the new rules — the first team to possess the ball in OT must score a touchdown or the game continues. The Patriots won the toss and Tom Brady led New England on a 12-play, 54-yard drive, getting the offense just close enough for Stephen Gostkowski to hit a 48-yard field goal that held up.

It was not lost on the players that they were able to pull out a close game.

“With the way some of these games have gone, it’s good to win a close one like this,” receiver Wes Welker said, brushing aside the notion that New England got away with one.

“It’s tough to win in the NFL. They’re all tough. It comes down to plays at the end, just like this one did. We’ve had some that didn’t go our way; luckily, this one did.”

Not surprisingly, Jets safety LaRon Landry, who led his team with 12 tackles, felt a bit differently.

“We blew it,” he said. “They didn’t do anything special at all. They didn’t create anything. We let them have it.”

This is one of those games that Patriots coach Bill Belichick, ever the perfectionist, loves: his team got the win, but there is clearly much work to be done.

“We just have to keep working harder to get better, to do things better and eliminate a few of the mistakes that we had,” Belichick said. “I’m proud of the team, I thought they played mentally and physically tough.”

A lost fumble on a kickoff return by Devin McCourty — who had provided the game’s most exciting play in the first quarter — gave the Jets the ball well inside Patriots territory with 2:01 to go in a tie game.

And while the New York offense actually lost yardage on the possession, it was still close enough for Nick Folk to drill a 43-yard field goal with 97 seconds to play, giving the Jets a 26-23 lead.

The Patriots answered, using the no-huddle offense to great effect — though they didn’t use it earlier in the game nearly as much given the success they had last time they were at home against Denver — and Gostkow­ski nailed his own 43-yard field goal to force overtime.

“My teammates saved my life today,” McCourty said. “A bad mistake in the fourth quarter and I just have to do a better job on holding the ball. This was a total team win and we just kept fighting. Things didn’t go our way the whole game, today we made enough plays when we needed to for the win.”

The Patriots began the fourth quarter with a 23-13 lead and saw the Jets — who came into the game with the 30th-ranked offense in the league — score 13 points in the quarter.

Sanchez, who had completed less than 47 percent of his passes in four of the Jets’ first six games, made good on 10 of 12 in the fourth quarter alone, good for 114 yards.

For the day, he was 28 of 41 for 328 yards, just the seventh 300-yard game in 53 career starts.

The Jets pulled to within 23-20 with 5½ minutes to play, prime time for the Patriots to switch into their four-minute offense and try to kill clock. The four-minute offense lasted all of 1:08.

“It was first and 10 and then we got a pass interference [on Brandon Lloyd], and then it’s first and 20 and then it’s a run and it’s third and 16,” Brady said. “So that’s not the way to play offensive football. I don’t think there’s going to be a high percentage playing that way. We can’t really put ourselves in that situation.

“We’ve all got to do a better job executing our plays. There’s no easy way out. It’s not like there’s a magic, special play you save for those situations. It’s about doing your job and doing a better job of it.”

Lloyd struggled for much of the day: in addition to the costly penalty, he was targeted eight times by Brady, and came away with just one 6-yard reception.

Folk hit the first of his 43-yarders when the Jets got the ball back, tying the game at 23-all. Then came McCourty’s fumble.

It was the third time in seven games that New England has blown a fourth-quarter lead, the first two coming in Baltimore and Seattle. The difference this time was the Patriots were able to find a way to win.

“A win’s a win,” said tight end Rob Gronkowski, who caught both of Brady’s touchdown passes. “I’ll take it whatever way. You can win some ugly and you can win some pretty and it just doesn’t matter. We worked together as a team and we got the victory.”

New York won the opening toss and deferred, and although the Patriots got back-to-back first downs to start from Shane Vereen, who got his first career start, the drive stalled after that.

When the Jets got the ball, they used two big plays to get into the red zone — first a 24 yard pass from Sanchez to Jeremy Kerley, then on third and 7, with the Patriots in dime coverage, Sanchez again found Kerley, this time for 26 yards.

The completions were the 34th and 35th pass plays of 20-plus yards the Patriots have allowed this season, by far the most in the NFL.

They wound up giving up six such plays in the game, pushing their total to 39.

When it looked like New England had stopped the Jets, with Sanchez and tight end Dustin Keller not able to hook up on third and 8 at the Patriots 17, they got a gift: Ras-I Dowling, who was in coverage on Keller, was flagged for holding, which gave the Jets 5 yards and an automatic first down.

Four plays later, including a short third down that saw Tim Tebow in at quarterback and fight for 3 yards, running back Shonn Greene ran in for the touchdown.

After not giving up a first-quarter touchdown over their first five games of the year, the Patriots gave up one in each of their last two games, with Seattle getting one and now the Jets.

New England wasted no time tying the score: McCourty found a major hole in the Jets kick coverage and then took off up the left sideline for a 104-yard touchdown, the first TD of his career.

The defense held despite the short rest, and when the offense took the field it had good field position and Brady led it to its first touchdown of the day. The seven-play drive was capped by a 17-yard throw to Gronkowski, who made a nice catch near the left sideline of the end zone with Landry in good coverage.

New England got a safety in the second quarter to go ahead, 16-7. A bobbled handoff to Greene plus Vince Wilfork bursting through the line led to Wilfork punching the ball into the end zone. Sanchez kicked it out of the back of the end zone, a penalty that led to the Patriots’ first safety since 2006 against Denver.

The Jets got a long Folk field goal before the half and then a short one at the start of the third quarter, pulling them within 16-13. Gronkowski got his second TD in the third, which put the Patriots ahead, 23-13.

They let the Jets back into the game, but as they headed home Sunday night, Patriots players wanted to remember only that they had won.

“Our main job was go get out of this game with a ‘W’, ” Wilfork said. “I don’t care how we get it [but] get a ‘W’. Division game, you can’t be pissed off with how you won or the things you’ve done. It showed a lot from these New England Patriots, just fighting in overtime.”