SEATTLE (AP) After 7 1/2 quarters of offensive inefficiency, the Seattle Seahawks finally broke the seal on the goal line.

It took some more magic from quarterback Russell Wilson to make it happen and avoid an 0-2 start.

Wilson avoided two potential sacks and found Paul Richardson in the front corner of the end zone for a 9-yard touchdown with 7:06 left and the Seahawks held on for an unsightly 12-9 win over the San Francisco 49ers on Sunday.

It was an offensive nightmare as both teams had combined for 14 total quarters without a touchdown this season before the Seahawks finally broke through. Wilson avoided Arik Armstead in the pocket and got his pass away before DeForest Buckner could pull him down. Seattle (1-1) snapped a streak of more than 112 minutes without a touchdown, despite missing on opportunities twice inside the 49ers' 10-yard line earlier in the game.

''We had to find a way to get into the end zone and capitalize,'' Wilson said. ''We had been down there a few times earlier in the game and missed our opportunities there, so this was all we got. We've got to go make it happen right now.''

Wilson was erratic at times and magical at the end. He was 23 of 39 passing for 198 yards. He rushed for another 34 yards, 27 coming on the decisive scoring drive. Wilson was 4 of 5 on the drive and aided by a 20-yard pass interference penalty against Dontae Johnson.

Richardson suffered a dislocated right ring finger in the first quarter that popped through the skin. The finger was put back in place and the skin stitched up so he could return and eventually made the winning catch.

''That was the goal once I got it sewed up, still go win,'' Richardson said. ''I wasn't just trying to get out there, `Oh he's tough, he's finishing out the game.' I wanted to go make a difference.''

Blair Walsh added field goals of 25 and 27 yards, but missed the extra point after Richardson's TD that could have given the Seahawks a four-point lead. The 49ers (0-2) only needed a field goal to tie but never got into position to have an opportunity.

San Francisco went three-and-out after the touchdown, punted and never got the ball back.

''I'm not happy at all. I'm extremely disappointed,'' 49ers coach Kyle Shanahan said. ''Anytime you as a team think you put yourself in a position to win the game, you expect to win it. I felt like we had that opportunity and we didn't get it done which is extremely disappointing.''

Robbie Gould kicked three field goals to amount for San Francisco's output. Carlos Hyde rushed for 124 yards, including a 61-yard run in the first half, but Brian Hoyer was 15 of 27 for 99 yards passing and an interception.

San Francisco took the lead on Gould's 34-yard field goal with 11:36 to play, but was unable to hold off Seattle's final drive.

Seattle should have found the end zone earlier, but had dropped passes on two drives inside the 49ers' 10 in the first half. C.J. Prosise dropped a potential touchdown near the goal line on Seattle's first drive. Tanner McEvoy was unable to corral a high pass from Wilson in the end zone on the second drive.

NO TDs

For the first time in franchise history, the 49ers have gone the first two weeks of the season without scoring a touchdown. In the two games, the 49ers have had one offensive drive inside the opponents' 10-yard line.

''It's only two games. We have a whole lot of games left,'' Hyde said.

RESOUNDING ROOKIE

Rookie Chris Carson rushed for 93 yards, including 58 yards in the fourth quarter. Carson was Seattle's primary option as Thomas Rawls had his amount of carries limited in his first game after suffering a high-ankle sprain in the preseason. Carson had 20 carries, while Rawls had just five.

INJURIES

San Francisco lost safety Eric Reid to a knee injury in the third quarter. Reid appeared to hurt his left knee in the first half and sat the rest of the half before returning in the third quarter. He lasted about five minutes before walking off the field with trainers again.

SITTING SURPRISE

Seattle running back Eddie Lacy was a healthy scratch for Sunday's game. It was a surprise absence as Lacy had not appeared on any injury reports. Like much of Seattle's offense, Lacy struggled to get going in the opener against Green Bay and was limited to 3 yards on five carries.

UP NEXT

49ers: San Francisco has a quick turnaround and will host the Los Angeles Rams on Thursday night.

Seahawks: Seattle will make its second long road trip of the season, traveling to Tennessee next Sunday.

---

For more NFL coverage: http://www.pro32.ap.org and http://www.twitter.com/AP-NFL

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.