The San Francisco 49ers beat the Seattle Seahawks 32-29 on Sunday at Lumen Field, staying unbeaten at 5-0.

Eddy Piñeiro kicked a 44-yard field goal with 1:56 left to put San Francisco ahead. The comeback included four takeaways and a 12-play, 74-yard touchdown drive. Brock Purdy threw a 7-yard touchdown pass to Brandin Cooks on that drive, then found Mike Evans for a two-point conversion. An earlier touchdown pass to Cooks had been wiped out because Seattle was granted a timeout before the snap.

Seattle tied the game at 29-29 on Jason Myers’ fifth field goal of the day before Piñeiro’s winner. With less than a minute remaining, safety Malik Mustapha forced Cooper Kupp out of bounds near the first-down marker. Kupp appeared to extend the ball far enough, but a replay review found no conclusive evidence of a first down.

The win gave the 49ers a two-game NFC West lead over Seattle, nine months after the Seahawks beat them 41-6 in the playoffs.