ARLINGTON, Texas — The San Francisco 49ers defeated the Dallas Cowboys 46-40 on Sunday, powered by a 584-yard offensive display that included three touchdowns exceeding 65 yards from scrimmage.

Quarterback Brock Purdy completed 22 of 28 passes for 389 yards and three touchdowns with no interceptions. Running back Christian McCaffrey caught touchdown passes of 74 and 66 yards, while receiver Deebo Samuel scored on a 70-yard rushing touchdown. The 49ers moved to 8-1 with the win.

The three 65-plus-yard scoring plays marked the first time any NFL team has achieved that in a single game since the Rams in Week 4 of 2000. San Francisco also recorded a 70-plus-yard passing touchdown and a 70-plus-yard rushing touchdown in the same game for the first time since Week 13 of 1998.

Purdy was particularly sharp when pressured, completing 8 of 8 passes for 175 yards and a touchdown while avoiding defenders outside the pocket. One sequence featured Purdy escaping pressure and finding McCaffrey, who had finished a blitz pickup, for the 74-yard score.

"It's great to know that we have players who can score from anywhere," tight end George Kittle said. "That makes our offense incredibly dangerous, but we have to stay on the field more."

Kittle noted obstacles to a cleaner performance: five sacks on Purdy and missed third-down conversions that could have ended the game earlier. Coach Kyle Shanahan said, "A lot of big numbers. I'm proud of the guys for that. Definitely wasn't as clean as all those numbers and yards. A lot of plays that we'd like to have back, some penalties we'd like to have back, but everybody seemed to make a play on offense."

The 584-yard output fell short of the 49ers franchise record of 621 yards set Oct. 8, 2012. But the yardage total represented the most San Francisco has gained in any game under Shanahan, who took over in 2017. The 46 points were the most the 49ers have scored against Dallas in their rivalry history.

Dallas surrendered 584 yards, the most in a home game in franchise history and the third-most in any game.