ORCHARD PARK, N.Y. - Two seasons traveling on opposite trajectories intersect Sunday when the Buffalo Bills host the San Francisco 49ers.

The Bills (3-2) have won three in a row since coach Rex Ryan fired offensive coordinator Greg Roman after an 0-2 start.

The 49ers (1-4) opened the season with a win but have since lost four straight and coach Chip Kelly is making his own change in hopes of reviving the offense.

More from FoxSports

Colin Kaepernick will replace Blaine Gabbert as San Francisco's starting quarterback, Kelly announced this week.

"We just felt like we needed to do something on the offensive side to get us going," Kelly said. "When you look at the depth on the offensive side of the ball, it was the one maneuver we could make."

Kaepernick, who helped lead the 49ers to the Super Bowl after the 2012 season and the NFC title game the following year, has not started since Nov. 1, a 27-6 loss to the Rams. He appeared in one more game before being ruled out for the season and finished with 1,615 passing yards, six touchdowns and five interceptions in nine games.

"Kap has been here before. Kap has done it before," 49ers offensive coordinator Curtis Modkins said. "He's no stranger to being a starting quarterback in this league and we look forward to seeing him move the football team."

Offseason shoulder, thumb and knee surgeries prevented Kaepernick from competing for job in the preseason. He backed up Gabbert for the first five games.

"I'm excited to be back out there," Kaepernick said. "I'm excited to have the opportunity to help my team win a game this week."

Kaepernick has received more attention for his national anthem protests than his play this season. Kaepernick is kneeling for the anthem to bring attention to social injustices and police brutality.

"Regardless of my play, this movement is going to be legitimate. People's lives are always going to be legitimate, they're always going to be worthwhile, they're always going to be worth fighting for," Kaepernick said. "Now if me winning some games and playing well amplifies how much people want to listen to what I'm saying and what I'm fighting for, great. But regardless of what happens on the field, there's nothing that can delegitimize what this movement is about."

Gabbert passed for 890 yards with five touchdowns and six interceptions in his five starts. In last week's 33-21 loss to Arizona, Gabbert threw two interceptions in 49ers territory that led to 10 Cardinals points. He ranks last in the NFL in yards per attempt (5.9) and has the second-lowest passer rating (69.6), but he has the most rushing yards of any quarterback (172) and two rushing touchdowns.

Modkins said Kapernick is similar enough to Gabbert that the 49ers won't change their offense to suit the new quarterback.

No matter who plays quarterback, Ryan respects Kelly's up-tempo offense and insists the Bills won't look past the 49ers.

"This is a dangerous team, there's no question about it," Ryan said. "We've won three games in a row, but we haven't won four games in a row. We need to focus on this opponent and believe me, we will. If we lose, it's not going to have anything to do with the fact that we overlooked somebody. That's not happening here."

The Bills are on a three-game winning streak for the first time since 2011 and have not won four in a row since starting 4-0 in 2008.

Under new offensive coordinator Anthony Lynn, the Bills have rejuvenated the rushing attack that led the NFL last season. In the past three wins, the Bills have averaged 178.3 rushing yards per game and 5.9 yards per carry. In the two losses, the Bills averaged 75.5 yards per game and 3.5 yards per carry.

LeSean McCoy is coming off his best game in two seasons with the Bills. He rushed for 150 yards on 18 carries (8.3 average) in last week's 30-19 win over the Los Angeles Rams. McCoy currently ranks fourth in the NFL in rushing with 447 yards and his 5.3-yard average ranks fifth among running backs carrying the ball at least 10 times per game.

"I'm just feeling good," McCoy said. "The guys up front are blocking really well, we're winning games and that's just the main focus. I'm trying to win games in Buffalo and that's all that really matters."

Last season, when Kelly was still coaching the Eagles, McCoy caused a stir before the Bills' Dec. 13 trip to Philadelphia by saying he would refuse to shake hands with Kelly because he was upset with being traded from the Eagles in the previous offseason.

McCoy said Wednesday that facing Kelly is no longer a big deal to him.

"For sure, way behind me," he said. "I think it was more just the team than Chip. Going back to my old team, where I did so much there, I got there at 20 years old. I was. I was there for quite some time, so I think more it had to do with just going back home."

The Bills might be without Pro Bowl defensive tackle Marcell Dareus again. Dareus was suspended for the first four games of the season for violating the NFL's substance abuse policy and was inactive last week because of a hamstring injury. Dareus has yet to practice this week and is questionable for Sunday.