ARLINGTON, Texas — There was no room for error for the Jets, and they had everything to play for. And just when it seemed Todd Bowles’ team would fold under the pressure, his players did just enough to squeak out a win in Jerry’s World.

A 40-yard field goal by Randy Bullock and Marcus Williams’ deflected interception in the final 36 seconds sealed a 19-16 win over the Cowboys on Saturday night at A&T Stadium. The Jets (9-5) won their fourth consecutive game and continued their push toward the playoffs.

Ryan Fitzpatrick — who was dangerously close to being called for a lost fumble in the waning minutes — connected with seldom-used receiver Kenbrell Thompkins on a 43-yard downfield catch along the right sideline. The play helped set the stage for Bullock’s winning kick.

Wins are wins, no matter how ugly, and luckily for the Jets, the Cowboys (4-10) are their own worst enemy.

For more than three quarters, it was unclear which team wanted to lose more. The Jets’ offense finally found its groove. Trailing 13-9 with 12:38 to play, Fitzpatrick connected with Brandon Marshall on a 20-yard completion for his 93rd catch of the season, tying Al Toon’s team record set in 1988. Fitzpatrick then found Quincy Enunwa, who fought for every inch of a 24-yard reception. Two plays later, Fitzpatrick hit a wide-open Eric Decker near the goal line for a 3-yard TD.

The score, which put the Jets ahead 16-13, was the 21st combined TD for Decker and Marshall, most by any receiver tandem in Jets’ history.

But the Cowboys refused to go quietly. Kellen Moore — who replaced Matt Cassel minutes into the second quarter — marched the Cowboys down the field. They tied it on Dan Carpenter’s 50-yard field goal that bounced off the right upright with 1:55 remaining.

Safety Calvin Pryor recorded the Jets’ third interception when he picked off Moore in the end zone with 5:25 remaining in the third quarter. But Fitzpatrick gave the ball right back, throwing directly into the hands of cornerback Terrance Mitchell at the Jets’ 19. It was Fitzpatrick ’s first pick in four games (147 passes).

The Cowboys threw two interceptions and made a quarterback switch in the second quarter, yet somehow they held a 10-9 lead at halftime.

Once again, the fast start on the road the Jets had hoped for never materialized. And once more, Bowles’ defense was tricked by a gadget play. Dallas had the momentum early, thanks to a 15-yard reception by Jason Witten on its first play from scrimmage. Two plays later, Cassel pitched the football to running back Darren McFadden, who flipped it to Lucky Whitehead on the reverse. The receiver weaved his way through the Jets’ porous coverage for a 33-yard gain.

After the Cowboys were forced to settle for a 27-yard field goal and a 3-0 lead, they received help from the Jets’ offense and special teams. A three-and-out by Fitzpatrick & Co. was compounded by Ryan Quigley’s shanked punt that went 25 yards before sailing out of bounds.

That gave the Cowboys the ball on the Jets’ 43, but Jerry Jones’ team found a way to squander the gifted opportunity. Facing pressure from nickel corner Buster Skrine to his left, Cassel stumbled and threw an ill-advised pass toward the right sideline. Unfortunately for Dallas, no one was in the vicinity except for cornerback Darrelle Revis, who scampered 24 yards on the return.

With 35 seconds left in the first quarter, the Jets took the lead on a 12-yard run by Bilal Powell. But Bullock was wide right on his first PAT miss as a Jet.

Just seconds into the second quarter, Cassel was sacked for a loss of 19 by linebacker Calvin Pace. It wasn’t long before Jason Garrett pulled Cassel and went to the inexperienced Moore. Cassel, who is 1-6 as a starter for the Cowboys, played only four series, completing 3 of 8 passes for 38 yards.

The Moore experiment got off to a rocky start. The 26-year-old lefthander threw an interception on his second NFL snap, an ill-advised pass easily plucked by safety Marcus Gilchrist.

But, as Bowles noted at halftime to CBS, the Jets continued to shoot themselves in the foot. Penalties — including three in the half on guard Brian Winters, a questionable horse-collar call on Pace and an illegal shift by special-teamer Leger Douzable — stalled drives, and a missed field-goal try proved costly.

Pace’s penalty, a 15-yard infraction, helped set up Dez Bryant’s 10-yard TD catch on Revis with 1:25 to go in the half.

The Jets apparently regained the lead when Bullock connected on a 40-yard field goal. But Douzable’s 5-yard penalty negated it, forcing a re-kick from 45, and Bullock missed with seconds left in the half.

Complicating matters for the Jets, linebacker David Harris — the “glue” of their defense, according to Bowles — did not play much of the first half because of a lower back injury. Cornerback Dee Milliner hurt his hamstring in the first half.