ORCHARD PARK, N.Y. (AP) - LeSean McCoy scored three times and the Buffalo Bills extended their winning streak to four with a 45-16 victory over San Francisco and new starter Colin Kaepernick Sunday.
McCoy had 140 yards rushing and shook off what appeared to be a frightening injury to his right knee late in the second quarter. Tyrod Taylor threw two touchdown passes in helping Buffalo win four straight for the first time since the start of the 2008 season.
Kaepernick provided the 49ers a spark in his first start in nearly a year. Blaine Gabbert was benched following a 33-21 loss to Arizona.
Kaepernick finished 13 of 29 for 187 yards, including a 53-yard touchdown pass to Torrey Smith. But San Francisco (1-5) couldn't finish drives, settling for three field goals by Phil Dawson, in losing its fifth straight game.
Kaepernick was the target of numerous boos and chants when he kneeled during the national anthem in continuing his protest against racial oppression and police brutality.
The 49ers run defense continued to prove porous, giving up 312 yards.
The blustery afternoon - with 25 mph gusts coming off Lake Erie - made things tough on quarterbacks and kickers.
The Bills blew the game open by scoring 21 points over a span of 7:02 straddling the third and fourth quarters.
Taylor completed a 30-yard pass to Justin Hunter. Then the 49ers were stopped for no gain on a fourth-and-1 at Buffalo's 40.
After McCoy put the Bills up 31-16 with 10:53 left in the fourth quarter, the Bills got the ball back on the ensuing kickoff. Keshawn Martin fumbled the return when he was stood up by a heavy hit by Nickell Robey-Coleman.
Two plays later, Taylor hit Robert Woods for a 5-yard touchdown pass.
McCoy scored twice on 18-yard runs and another on a 4-yard scamper. He tied his career-high for touchdowns in his second meeting against Chip Kelly. McCoy expressed bitter feelings toward Kelly for trading him from Philadelphia to Buffalo.
McCoy's 3-TD game was the third of his career, and first since Philadelphia's 45-19 win over the Rex Ryan-coached Jets on Dec. 18, 2011. He became Buffalo's first player to score three times rushing since Willis McGahee had four TDs in a 38-9 win at Seattle on Nov. 28, 2004.
Kaepernick received a cold welcome. Fans chanted "USA! USA! USA!" shortly before he knelt for the anthem.
Outside New Era Field, one vendor was selling T-shirts against Kaepernick.
"Wanted: Notorious Disgrace to America," and featured a picture of Kaepernick throwing a pass and a bullseye aimed at his chest.
Another T-shirt featured a drawing of a kneeling Kaepernick with the words, "Shut Up and Stand Up!" printed.
Buffalo's defensive backfield left Smith wide open in scoring on his 53-yard catch and run . Cornerback Stephon Gilmore let Smith blow past him at the line of scrimmage leaving Smith open up the right sideline. He easily caught Kaepernick's pass and then cut into the middle to avoid being tackled by safety Aaron Williams who was Buffalo's only defender deep.
49ers: Host Tampa Bay on Oct. 23.
Bills: Play at AFC East rival Miami on Oct. 23.
Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.