ORCHARD PARK, N.Y. -- For the second consecutive week, the Buffalo Bills battled back to hold their ground in the AFC wild-card hunt.
After coming from behind to win in Cincinnati last week, the Bills (6-5) own a winning record after 11 games for just the fourth time in 17 seasons. Buffalo remains one game behind the Miami Dolphins and the loser of Sunday night's game between Kansas City and Denver for the final AFC wild-card spot.
"As far as the playoff picture, we knew every game matters for us and we have to take it one game at a time," said quarterback Tyrod Taylor, who was 12 of 18 passing for 166 yards and a touchdown and ran for 38 yards and another score.
Wide receiver Sammy Watkins returned for the Bills after missing the past eight games due to lingering pain in his left foot following offseason surgery to repair a stress fracture. Watkins recorded 80 yards on three receptions and drew a crucial pass interference penalty on the game-winning touchdown drive.
Playing one week after undergoing surgery to repair a dislocated thumb, McCoy became the first Bills player with three multiple-touchdown games in the same season since Willis McGahee in 2004.
The Jaguars (2-9) have lost six straight.
"Our guys played their tails off," Jaguars coach Gus Bradley said. "It went back and forth, but they made more plays than we did, especially at the end of the game."
Blake Bortles completed 13 of 26 passes for 126 yards and two touchdowns and did not turn the ball over for just the third time this season. Bortles also ran for a career-high 81 yards for Jacksonville.
"I think we've had a little bit of Murphy's Law," Bortles said. "If it can go wrong, it will go wrong and at the most inopportune time."
Chris Ivory rushed for 44 yards and a touchdown in the first quarter before leaving the game with a hamstring injury. With Ivory out, Denard Robinson rushed for 39 yards and T.J. Yeldon, who did not practice during the week due to an ankle injury, had 17 as the Jaguars piled up 183 on the ground.
"Each week, we'll be in it, but we just haven't found ways to close out games," Jaguars wide receiver Allen Hurns said. "It's frustrating for us because we invest so much and keep coming up short."
After exchanging the lead twice in the third quarter, Justin Hunter leapt over two defenders to catch a 16-yard touchdown pass from Taylor and McCoy ran in the two-point conversion to give the Bills a lead that would hold up for the final 10:42.
In seven games with the Bills, Hunter caught seven passes. Four of them are touchdowns.
"I'm not going to complain about it," Hunter said. "I'll take them as they come. As long as I'm in the red zone, it's my zone."
Hurns took a short pass from Bortles and ran to the pylon for a 12-yard touchdown that gave the Jaguars a 21-20 edge on the first play of the fourth quarter. Hurns injured his hamstring on the play and did not return.
Buffalo went in front 20-14 late in the third quarter when Taylor threw a 62-yard bomb to Watkins to set up his own 7-yard TD run three plays later.
Bortles connected with Marqise Lee for a 20-yard touchdown that put the Jaguars ahead 14-13 early in the third quarter.
McCoy's 75-yard touchdown on the first play of the second half gave Buffalo a brief 13-6 lead. The run was the longest of McCoy's career and exceeded the Bills' yardage total from the first half (50).
"We didn't look so good in the first half, but in the second half, we came out and made the plays we needed to make," Watkins said.
The Bills did not cross midfield until Brandon Tate's punt return and an illegal formation penalty gave them a drive starting at the Jacksonville 22 late in the second quarter. After rookie Jonathan Williams converted a fourth-and-1, McCoy found the end zone on a 7-yard run with 20 seconds remaining. But Dan Carpenter missed the extra point and the Jaguars went into halftime with a 7-6 lead.
The Jaguars scored a touchdown on their opening drive for the first time in 25 games and went up 7-0 on Ivory's 2-yard run. Jacksonville converted three third downs on the nearly seven-minute drive, including Bortles' 27-yard run deep into Buffalo territory and a defensive holding penalty in the end zone.
NOTES: Bills DE Marcell Dareus registered his 35th and 36th career sacks, moving into the top 10 on the team's all-time list, but sat out the fourth quarter with an abdominal strain. ... Bills CB Ronald Darby was knocked out of the game with a concussion after taking a knee to the head in the first quarter. WR Walter Powell (ankle) left the game in the third quarter. ... Jaguars WR/KR Rashad Greene Sr. (Achilles) and S Peyton Thompson (ankle) were injured in the first half and did not return. The Jaguars were also without DT Abry Jones (ankle). ... Bills WR Robert Woods and WR Percy Harvin (illness) did not play. ... Jaguars DE Yannick Ngakoue recorded his sixth sack, the most among NFL rookies and one shy of the team's rookie record set by Tony Brackens in 1996. Rookie LB Myles Jack shared his first career sack with Tyson Alualu. DT Malik Jackson had two sacks. ... Buffalo owns 20 rushing touchdowns for the first time since 1990.