Santa Clara, Calif. — The 49ers got Frank Gore involved in the offense again, and it returned them to their winning ways.
Hard-nosed defense helped, too.
Gore had a career-best 55-yard touchdown reception and ran for 119 yards in his first 100-yard game of 2014, leading San Francisco past Philadelphia, 26-21, on Sunday to hand the Eagles their first loss.
The 49ers (2-2) avoided their first three-game losing streak under fourth-year coach Jim Harbaugh, containing the league’s top passer. Nick Foles threw two incomplete passes from the 1 in the waning moments after gaining six first downs on a lengthy drive, more than the five the Eagles managed before that.
Foles completed a 22-yard pass to Jeremy Maclin on the right sideline on that late drive. The 49ers challenged whether he had possession, but the play stood, costing the 49ers their final timeout.
The Eagles couldn’t pull off the second-half magic that had carried them in their three wins.
On a day the 49ers gave up big plays on special teams, Gore delivered. Colin Kaepernick also threw a touchdown pass to Stevie Johnson and Phil Dawson kicked three field goals — two of at least 46 yards. Kaepernick finished 17 for 30 for 218 yards, two TDs and four sacks.
Darren Sproles had a career-best 82-yard punt return for a touchdown, Malcolm Jenkins ran an interception 53 yards for a score for the Eagles (3-1).
Brad Smith recovered Trey Burton’s blocked punt against Andy Lee for a TD.
The 49ers produced in the second half for the first time this season to give Harbaugh a win against former Pac-10 foe Chip Kelly.
Antoine Bethea intercepted his first pass with the 49ers and forced a fumble, then the secondary kept the pressure on in the red zone. Perrish Cox made an interception with 41 seconds left to seal it.
Gore’s long scored from an off-balance throw by Kaepernick on the first play of the second quarter was the longest TD catch by a running back this season.
But on San Francisco’s next series, Kaepernick threw right to Jenkins and he broke three tackles on the way to the end zone.
The 49ers won their first game at new Levi’s Stadium, where thousands of fans skipped out at halftime.
San Francisco outgained the Eagles, 232-73, in the first half, but still trailed 21-13.
Then Johnson tiptoed both feet inbounds inside the left pylon in the third quarter for a 12-yard catch, the first second-half TD of the year for San Francisco, outscored, 52-3, after halftime in its first three games.
Dawson kicked a 51-yarder before halftime, but the NFL’s most-penalized team hurt itself with seven more flags for 60 yards in the first half and 10 total for 80 yards. The Eagles also had 10 penalties for 70.
San Francisco right tackle Anthony Davis made his season debut but went down on the final play of the first quarter when Kaepernick took a sack right into the back of Davis’ left knee.
Tight end Vernon Davis was out because of a back injury early in the third quarter; he missed last Sunday’s loss at Arizona because of a hurting left ankle.
Foles, who led the NFL in passer rating a year ago, was 21 for 43 for 195 yards and two interceptions.
Tampa Bay 27, (at) Pittsburgh 24: Mike Glennon hit a diving Vincent Jackson for a 5-yard touchdown with seven seconds remaining to lift Tampa Bay and give Lovie Smith his first victory as Buccaneers coach.
“I was out last year, so it’s been a long time since I’ve tasted winning a game,” Smith said. “For our football team, we needed this.”
The Buccaneers (1-3) lost to Atlanta by six touchdowns a week ago but bounced back. Glennon passed for 302 yards in his first start of the season, including a 41-yard catch-and-run by Louis Murphy that set up Jackson’s score.
Ben Roethlisberger passed for 314 yards and three touchdowns but Pittsburgh (2-2) couldn’t protect a seven-point lead in the fourth quarter. Antonio Brown caught seven passes for 131 yards and two scores.
(At) Indianapolis 41, Tennessee 17: Andrew Luck threw four touchdown passes and Reggie Wayne scored for the first time this season.
Indy (2-2) extended its league-leading streak of consecutive wins over division foes to nine.
Luck was 29 of 41 for a season-best 393 yards. Wayne had seven catches for a season-best 119 yards and scored on a spectacular spinning 28-yard catch.
Tennessee (1-3) has lost three straight.
(At) Minnesota 41, Atlanta 28: Rookie quarterback Teddy Bridgewater passed for 317 yards and a key 2-point conversion before leaving because of an ankle injury for the Vikings.
Bridgewater was 19 for 30 with no turnovers and ran five times for 27 yards and a score in his first career start, but on his last carry, his left foot rolled underneath him as he was sandwiched by two tacklers at the 1.
Matt Asiata powered his way in on the next play for his third touchdown, and Bridgewater stayed in to zip a crisp pass to Rhett Ellison to push the lead to 35-28.
As Bridgewater was taken away on a cart for X-rays, Christian Ponder took over at quarterback for the Vikings (2-1).
The Falcons (2-2) lost three starting offensive linemen to injuries and wound up sticking tight end Levine Toilolo at right tackle in the fourth quarter.
Miami 38, Oakland 14: At London, Ryan Tannehill threw for 278 yards and two touchdowns, leading the Dolphins.
Tannehill, who was in the middle of a storm all week because his coach declined to confirm him as this week’s starter, took advantage of a depleted Oakland defense to snap a two-game losing streak for the Dolphins (2-2).
“I know I wasn’t playing up to standards the last few weeks, so I wanted to come out and personally play better,” Tannehill said. “My teammates demand that from me and they expect that from me, and to finally come out and do that felt good.”
The Raiders (0-4) scored on their opening drive but struggled after that. Starting quarterback Derek Carr was injured in the third quarter, replaced by third-stringer Matt McGloin.
(At) Baltimore 38, Carolina 10: Steve Smith punished his former team with seven catches for 139 yards and two touchdowns to lead the Ravens.
Smith spent 13 seasons with Carolina before he was released in a cost-cutting move during the offseason. The 35-year-old receiver showed the Panthers he can still make the big play, scoring twice in the second quarter to help put Baltimore (3-1) in front 21-7 at halftime.
The first touchdown came when Smith grabbed a pass that deflected off the right hand of teammate Owen Daniels. He caught the ball in stride and took it into the end zone to complete a 61-yard play.
Smith also scored from 21 yards out with a diving reception.
“He recognized the gravity of the situation,” Ravens coach John Harbaugh said, “the need to get control of those emotions.”
Joe Flacco went 22 of 31 for 327 yards and three touchdowns, the other a 24-yarder to Torrey Smith.
Carolina (2-2) has lost two straight, both in lopsided fashion against AFC North foes.
(At) San Diego 33, Jacksonville 14: Philip Rivers threw for 377 yards and three touchdowns, two to Eddie Royal, and the Chargers turned back an early scare from Blake Bortles and the winless Jaguars.
Royal had scoring catches of 47 and 43 yards, his second straight two-touchdown game. The Chargers (3-1) extended their winning streak to three.
Rivers had his second three-touchdown game of the season. He went 29 of 39.
Royal had five catches for 105 yards. Keenan Allen had 10 for 135, both career highs, and Malcom Floyd had a 24-yard touchdown catch.
Bortles made his first start for the Jaguars (0-4), threw one touchdown pass, was intercepted twice and twice had Jacksonville in the lead in the first half.
(At) Dallas 38, New Orleans 17: Tony Romo threw three touchdowns passes — two to Terrance Williams — and DeMarco Murray ran for a pair of scores in another 100-yard game. The Cowboys kept Drew Brees and the Saints scoreless in the first half after giving up an NFL-record 40 first downs in a 49-17 blowout loss in New Orleans last year.
Brees led two scoring drives early in the fourth quarter to cut a 31-3 deficit in half before the Cowboys regained control.
Dallas reached 3-1 for the first time under coach Jason Garrett after also starting 2-1 the three previous seasons. The Cowboys are tied with Philadelphia for the NFC East lead.
The Saints (1-3) couldn’t sustain the momentum from their win against Minnesota and lost to the Cowboys in Texas for the first time since 1991.