Buccaneers rookie quarterback Mike Glennon engineered an 80-yard scoring drive with 1:18 remaining in the second quarter to give Tampa Bay its first points of the day against the 49ers, who lead 17-7 at the half.
Glennon hit wide receiver Vincent Jackson in traffic for an 11-yard touchdown. He finished the first half 9 of 16 for 79 yards and a touchdown.
Niners quarterback Colin Kaepernick finished 11 of 13 for 148 passing yards and two touchdowns, including a second-quarter 52-yard touchdown pass to tight end Vernon Davis, who was working against strong safety Mark Barron.
Davis was targeted five times, finishing with four catches for 77 receiving yards.
Wide receiver Michael Crabtree caught three passes for 28 receiving yards, including a 4-yard touchdown against Johnthan Banks in man-coverage.
Defensive end Adrian Clayborn and defensive tackle Gerald McCoy each recorded a sack in the first half.