(CNN) -- The San Francisco 49ers beat the Denver Broncos 24-16 as Wembley Stadium in London played host to an NFL match for the fourth time on Sunday.
In a showdown between two struggling sides, the only points from a disappointing first half came from Joe Nedney's 34-yard field goal for San Francisco.
However, early in the second half, Denver quarterback Kyle Orton's 71-yard pass to Brandon Lloyd stopped only one-yard short of the end zone.
And in the next passage of play, young quarterback Tim Tebow carried the ball over for only his second career touchdown.
A 32-yard field goal from Matt Prater put the Broncos 10-3 ahead, but the 49ers quickly rallied.
Troy Smith completed a 38-yard pass to Delanie Walker and then completed a one-yard run himself to score the game-tying touchdown. And then Smith threw to Michael Crabtree for a second touchdown pass soon after.
And the 49ers made the result safe when Orton's pass was intercepted and Frank Gore crossed for another touchdown.
There was a late rally from the Broncos when Orton's one-yard pass found Lloyd in the end zone, but Prater missed the extra point to make it 24-16.