LONDON — Throwing off his wrong foot, his back nearly parallel to the field, Troy Smith heaved a pass Sunday night toward a receiver surrounded by Denver's Champ Bailey and Brian Dawkins, a duo with a combined 17 Pro Bowls between them.

Like so much of the San Francisco 49ers' season through seven games, Smith's decision, on the surface, looked horrendous. This time, though, something dramatically different happened on the way to disaster: The apparent gaffe was a game-changing play.

The unlikely 38-yard, fourth-quarter hook-up between Smith, a third-stringer a week ago, and tight end Delanie Walker, subbing for injured starter Vernon Davis, sparked the previously slumbering Niners, who awoke for a 24-16 win over the Broncos before a partisan San Francisco crowd of 83,941 at Wembley Stadium.

Niners coach Mike Singletary invoked Brett Favre's name when discussing Smith's recklessly brilliant prayer.

"Am I going to go in there and say &‘Hey, don't do that,'" Singletary said. "I don't think so. But I will say &‘Be careful.' But that's about it. The kid made a play."

At a perfect time.

Trailing 10-3 with less than 14 minutes left, Smith, a four-year veteran making his first start since his rookie year, connected with Walker down to the one-yard line. Two plays later, Smith ran a bootleg into the right corner to tie the game, a touchdown that kicked off a string of San Francisco highlights.

When it was over, the Niners (2-6) had scored 21 fourth-quarter points, more than they had managed in five of their first seven games. In addition, they had a flicker of postseason hope — closing to within 2? games of first-place Seattle in the NFC West — and a budding quarterback controversy.

In the second half, Smith (12 of 19, 196 yards), subbing for injured starter Alex Smith, completed 8 of 10 passes for 110 yards with a go-ahead 28-yard touchdown to Michael Crabtree. He didn't commit a turnover and finished with a 115.2 quarterback rating, a figure Alex Smith has topped twice in 50 career games.

Perhaps most significantly, he ran his record this season to 1-0 as the Niners' starter. Alex Smith's mark is 1-6.

On Wednesday, it was announced that Alex Smith was expected to miss two to three weeks with a separated non-throwing shoulder, meaning he could be available after this week's bye. Who will start when Alex Smith returns? In response, Singletary didn't utter the phrase "Alex Smith is our starting quarterback."

"We're going to continue to go forward with Troy Smith right now," Singletary said. "We're going into the bye week and as far as Alex Smith is concerned, it's a week-to-week deal. I'll wait and talk to our doctors, trainers, whatever. But we'll make those decisions when we need to."

Troy Smith's decision to heave the ball to Walker was borne out of a bond they'd formed during their week in England. Smith, in his eighth week with the Niners, took his first-ever reps with the first team about 100 hours before kickoff. With Davis missing two practices due to an ankle injury he aggravated during the game, Walker also ran with the first team and connected with the new starting quarterback.

"He is one of those guys that offensively helped me throughout the week game planning, my whole preparation," Smith said. "I told him, &‘if I get in a situation where I have to look for a guy, it's going to be you.'"

Said Walker, "I told Troy all week, &‘Throw that ball and I'm going to go get it.' We talked about it all week. He said, &‘Man if I see one-on-one coverage, I'm throwing it.' He saw it. I saw it. He believed in me and I believed in him."

The belief seemed to permeate a downtrodden team which had managed three points and nine first downs in the game's first 46 minutes. The Niners' inert offense had even managed to silence a partisan crowd that had greeted them with roars prior to the game while booing the Broncos.

But the Smith-to-Walker connection, at long last, gave them reason to cheer. And the noise only increased on San Francisco's next offensive drive as Smith capped a four-play, 48-yard march with a dart to Crabtree in the right corner for a 17-10 lead.

Then, on Denver's next offensive play, linebacker Manny Lawson caught quarterback Kyle Orton from behind in mid-scramble, forcing a fumble that linebacker Takeo Spikes returned eight yards to the Broncos 18.

Six plays later, running back Frank Gore (29 carries, 118 yards) scored on a three-yard run for a 24-10 lead with 3:47 left.

In a dizzying 10-minute span, San Francisco, averaging 16.1 points a game, had scored 21 points. For his part, Smith, who had 86 yards passing in the first 46 minutes, had thrown for 110 yards. Finally, the Niners had a 14-point lead — something they had experienced for seven of the season's first 476 minutes.

Gore said the turning point arrived when the coaching staff took the shackles off Smith, who entered with 13 regular-season passes since 2008. As a result of the conservative game plan, San Francisco ran on 29 of its first 42 offensive plays. On their three fourth-quarter touchdown drives, the Niners passed on seven of 16 plays.

"Our receivers just told our coaches, &‘you know, let's play,'" Gore said. "We can't try to hold stuff back. You know our coaches called it and Troy did a great job ... he made big plays when it counted and when we needed it."

Orton (369 yards) and wide receiver Brandon Lloyd (169), ranked second in the NFL in passing yards and receiving yards, respectively, managed to make it interesting.

Orton threw a one-yard touchdown to Lloyd with 2:22 left and kicker Matt Prater missed the extra point to cut the gap to 24-16.

After the Niners went three-and-out on their next series, Denver (2-6) took over and drove 36 yards to San Francisco's 45 with 45 seconds left, but Orton's deep pass to Jabar Gaffney was intercepted by Shawntae Spencer to seal the victory.

The game-sealing pick was sweet for Spencer, who was burned for a game-tying touchdown in last week's 23-20 loss to Carolina. Spencer said he was driven to atone for his error and had perhaps the best week of practice in his seven-year career.

"My mindset was practice-wise was where it all begins," he said. " ... I didn't want to have that feeling again."

Smith, of course, acknowledged that he'd like to have the starting job. And he might have earned it with his fourth-quarter play.

After all, he had made something out of nothing — a welcome change for a team that seemingly had something special this season and had done almost nothing until Sunday's game.

For more on the 49ers, go to Instant 49ers at blog.pressdemocrat.com/49ers. You can reach Staff Writer Eric Branch at eric.branch @pressdemocrat.com and follow him at twitter.com/Eric_Branch.