The offense built a big lead with a second-half scoring burst, but the defense let the Miami Dolphins back in the game.
And in the end, Olindo Mare was jogging out onto the field for a potential tying field goal.
"I think a lot of us felt that we were probably headed to overtime," Jets quarterback Chad Pennington said.
But Mare came up short on a 51-yarder as the Jets barely held on for a 20-17 win, New York's first home victory.
"Those types of field goals, he makes," Pennington said. "For him to miss one was a shock to us. We felt like we had to get ready to go into overtime. Luckily, we caught a break."
"We don't even think about it when we're in that fast offense," Dolphins receiver Chris Chambers said. "Everybody knows what they have to do. The defense can't really set up for what they want to do. We were just using three different plays and they were working. Everything was clicking."
But Mare, who was 1-for-3 this season on kicks of 50-plus yards, came up short, the ball landing in the end zone as the jubilant Jets cheered.
"We thought he could make the field goal," Miami coach Nick Saban said. "We had confidence in him."
Harrington, making his second straight start in place of the injured Daunte Culpepper, finished 27-of-43 for 266 yards and one touchdown and two interceptions, while Brown had 127 yards on 22 carries.
"We moved the ball well all day," Harrington said. "The first three quarters, we made mistakes -- the same stuff we've done all year. In the fourth quarter, we didn't do that. We finished drives, which is what we didn't do the rest of the game."
Two plays after Mare's 21-yard field goal cut the deficit to 6-3, the Jets answered right back on Coles' 58-yard touchdown catch, the longest of his career.
On the second play of the drive, Coles broke down the left sideline but cornerback Eddie Jackson turned inside as the Jets receiver zipped by. Pennington, seeing him wide open, lofted a pass that Coles caught near the Dolphins 35 and then took off into the end zone untouched to make it 13-3 with 3:23 left in the third quarter.
"It was supposed to be a slant-and-go," Coles said, "but he bit so hard off of one step, I just cut it off and straightened up. From there, it was a touchdown."
New York then took advantage of a turnover. On second-and-10 from Miami's 40, Sammy Morris ran the ball for 3 yards before Rashad Moore poked it out of Morris' hands and Victor Hobson recovered.
"We've got to get over the hump and get a win," Chambers said. "We've got to try and fix this. We've shot ourselves in the foot every time."
Six plays later, Coles caught a 22-yard pass from Pennington in the right corner of the end zone for his second TD catch of the day, giving the Jets a 20-3 lead 1:45 into the fourth quarter. Coles finished with five catches for 106 yards, while Pennington was 17-of-29 for 175 yards and the two TDs.
The victory went a long way in softening the embarrassment from last week's 41-0 loss at Jacksonville.
"I can't tell you how good this win feels," Pennington said. "Last week and just this week building up to this game was a tough week, I know for my team, and especially for me."
Miami cut it to 20-10 on Chambers' 2-yard touchdown catch from Harrington, capping a 12-play, 81-yard drive with 8:49 remaining.
Leon Washington, who had 42 yards rushing on the drive, had a 12-yard scramble and then powered ahead for 11 yards to get to the Dolphins 24. Two plays later, Washington scampered for 8 yards to put the ball on the 15. Coach Eric Mangini, who has shown to be a gambler on fourth down, instead sent Nugent out to get the points on the board.
Coles' 12-yard catch in the second quarter was the 450th of his career. With his five catches, he has 453 in seven NFL seasons. ... Chambers, who finished with five catches for 60 yards, has caught a pass in 53 straight games.