The New England Patriots take on the San Francisco 49ers in a regular season game at Levi's Stadium on Sunday, November 20, 2016.

New England Patriots quarterback Tom Brady walks on the field before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady walks on the field before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady walks on the field before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

A San Francisco 49ers fan tailgates before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

A general view of Levi's Stadium prior to an NFL football game between the San Francisco 49ers and the New England Patriots, Sunday, Nov. 20, 2016, in Santa Clara, Calif. (Ryan Kang via AP)

A New England Patriots fan wearing the jersey of quarterback Tom Brady (12) stands next to a San Francisco 49ers fan wearing the jersey of former quarterback Joe Montana inside Levi's Stadium before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Jeff Chiu)

New England Patriots wide receiver Julian Edelman warms up before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) yells while warming up before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots quarterback Tom Brady (12) yells while warming up before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots quarterback Tom Brady (12) warms up before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) greets San Francisco 49ers head coach Chip Kelly before an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) greets friends on the field before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Danny Amendola (80) warms up before an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

Former San Francisco 49ers owner Edward DeBartolo, left, talks with New England Patriots chairman and CEO Robert Kraft before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots head coach Bill Belichick watches as players warm up before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots head coach Bill Belichick, center, introduces his girlfriend Linda Holliday to former San Francisco 49ers owner Edward DeBartolo before an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Julian Edelman (11) catches a touchdown pass in front of San Francisco 49ers cornerback Keith Reaser (27) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Julian Edelman (11) celebrates after catching a touchdown pass with Danny Amendola against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

San Francisco 49ers quarterback Colin Kaepernick (7) tries to escape from New England Patriots strong safety Patrick Chung (23) and defensive end Trey Flowers (98) before Chung sacked him during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

San Francisco 49ers quarterback Colin Kaepernick (7) is sacked by New England Patriots strong safety Patrick Chung, bottom, during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) passes against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots running back James White (28) scores a touchdown against San Francisco 49ers cornerback Rashard Robinson during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) and running back James White (28) celebrate after connecting on a touchdown pass against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Julian Edelman (11) celebrates after catching a touchdown pass with Danny Amendola against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

San Francisco 49ers quarterback Colin Kaepernick (7) tries to escape from New England Patriots strong safety Patrick Chung (23) and defensive end Trey Flowers (98) before being sacked by Chung during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

San Francisco 49ers running back Carlos Hyde (28) is tackled by New England Patriots strong safety Patrick Chung (23) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots running back LeGarrette Blount (29) runs against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots outside linebacker Kyle Van Noy (53) sacks San Francisco 49ers quarterback Colin Kaepernick (7) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots running back LeGarrette Blount (29) runs against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots running back LeGarrette Blount (29) runs against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)












New England Patriots quarterback Tom Brady (12) passes against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots running back Dion Lewis (33) runs against San Francisco 49ers strong safety Jaquiski Tartt (29) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) gestures at the line of scrimmage against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) loses the ball as he his hit by San Francisco 49ers linebacker Ahmad Brooks, hidden, during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. Brady recovered the ball. (AP Photo/Ben Margot)

Rain falls on New England Patriots quarterback Tom Brady (12) during the first half of an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots fans hold up a sign for quarterback Tom Brady during the second half of an NFL football game between the San Francisco 49ers and the New England Patriots in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)

New England Patriots wide receiver Malcolm Mitchell (19) runs past San Francisco 49ers cornerback Keith Reaser (27) to score a touchdown during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) and wide receiver Malcolm Mitchell (19) celebrate after connecting on a touchdown pass during the second half of an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots defensive end Trey Flowers (98) tackles San Francisco 49ers quarterback Colin Kaepernick (7) during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Malcolm Mitchell (19) runs past San Francisco 49ers strong safety Antoine Bethea (41) to score a touchdown during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots head coach Bill Belichick watches during the second half of an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots wide receiver Julian Edelman (11) runs through a tackle attempt by San Francisco 49ers strong safety Antoine Bethea (41) during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots running back LeGarrette Blount (29) and quarterback Tom Brady (12) celebrate after the Patriots beat the San Francisco 49ers in an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots fullback James Develin (46) and quarterback Tom Brady celebrate after an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots head coach Bill Belichick speaks at a news conference after an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady speaks at a news conference after an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady speaks at a news conference after an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots head coach Bill Belichick speaks at a news conference after an NFL football game against the San Francisco 49ers in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Marcio Jose Sanchez)

New England Patriots quarterback Tom Brady (12) passes against the San Francisco 49ers during the second half of an NFL football game in Santa Clara, Calif., Sunday, Nov. 20, 2016. (AP Photo/Ben Margot)
SANTA CLARA, Calif. (AP) -- Tom Brady chatted up one of his old favorites in Tom Rathman, then pushed aside all that nostalgia for a few hours to earn his 199th career victory.
Brady threw for 280 yards and four touchdowns and the New England Patriots beat the 49ers 30-17 on Sunday. Brady tied Hall of Famer Brett Favre for second-most wins by a quarterback in NFL history. With his next win, Brady will match Peyton Manning for the top spot.
Back home in the Bay Area playing on San Francisco's home field for the first time, facing the team he cheered as a boy, Brady handled the game and took care of the ball on a day it was difficult to do so.

When the game ended, a rainbow had emerged over the entire stadium - a fitting cap to Brady's fine afternoon. No. 12 then threw a football into the stands behind one end zone and hustled off to see all of his supporters.
"It was very cool. It doesn't get any better than that. To have the first chance to ever do that was very special," Brady said . "I felt it in pregame warmup and it carried right to the last play of the game. It was pretty great.
"They have a great organization, they always have. They inspired a lot kids here in the Bay Area in my time growing up, and I was one of them."
Under pressure on the slick grass, Brady found Danny Amendola for a 5-yard touchdown to start the fourth quarter, then later hit Malcolm Mitchell on a 56-yard score for his fourth TD pass.
Brady also threw short touchdown passes to Julian Edelman and James White on his first two possessions and completed 24 of 40 passes. The AFC East-leading Patriots (8-2) bounced back from last week's loss to the Seahawks on a rainy day at Levi's Stadium.
Edelman caught a 4-yard TD pass for the first score of the game , breaking away from Keith Reaser to the corner and barely keeping two feet inbounds. He finished with eight receptions for 77 yards and Mitchell had four catches for 98 yards.
Brady hit White for a 9-yard touchdown , then Amendola reached a career high with his fourth TD catch of 2016 on the first play of the fourth quarter. Mitchell's athletic, reaching grab between two defenders and straightaway speed after the catch resulted in his first career touchdown sealed it.
Brady completed eight of his first nine passes and nine of 11, while New England's defense flew through a leaky offensive line at Colin Kaepernick for four first-half sacks and five in all.
Brady had never played a road game against the 49ers. He injured his knee before the Patriots' 2008 visit to Candlestick Park - the very place the young Brady used to cheer Joe Montana and witnessed "The Catch" by Dwight Clark.
It only took until his 17th NFL season for Brady to finally get this chance. Of course, he shined in the big moment.
"He's Tom Brady. He's going to make the plays he's going to make, and that's what he did today," 49ers linebacker Ahmad Brooks said.
LeGarrette Blount had a season-long 44-yard run and finished with 125 yards rushing.
Kaepernick threw an 18-yard touchdown pass to Vance McDonald late in the first half to get the 49ers (1-9) within 13-10, but they didn't do enough right after intermission until Shaun Draughn's late 13-yard TD catch.
Levi's Stadium was so packed with Patriots fans it almost sounded like Foxborough.
Kaepernick has looked improved each week since regaining the starting job last month, completing 16 of 30 passes for 206 yards. But the 1-and-Niners - as their nickname quickly became Sunday - lost a ninth straight game under first-year coach Chip Kelly since opening the season with a shutout of the Rams.
SO MANY TARGETS:During the regular season, Brady has thrown touchdown passes to 63 players - second most behind Vinny Testaverde's 70.
Brady also had four TD passes with no interceptions for the 21st time in his career.
PATS PASS RUSH:Four Patriots had first-half sacks on Kaepernick: Patrick Chung, Malcolm Butler, Kyle Van Noy and Dont'a Hightower. Rob Ninkovich sacked Kaepernick in the second half.
LEWIS' DEBUT: Pats running back Dion Lewis made his season debut after recovering from reconstructive surgery on his left knee. He had a 9-yard reception for a first down during New England's opening drive.
"I thought he helped us," coach Bill Belichick said. "I think he'll keep getting better."
DAWSON'S MARK:With a 33-yard field goal in the first quarter, San Francisco's 41-year-old kicker, Phil Dawson, became the 10th kicker in NFL history to reach 400 field goals.
SMITH'S FIRST MISS:San Francisco wideout Torrey Smith missed his first career game and had his streak of consecutive games snapped at 89 because of a shoulder injury sustained last week at Arizona. This is his sixth NFL season.
UP NEXT
Patriots:at Jets on Sunday.
49ers: at Dolphins on Sunday.