J.T. O'Sullivan might have moved a step closer toward completing his long-shot bid to become the San Francisco 49ers starting quarterback.

O'Sullivan threw a 59-yard touchdown pass to Josh Morgan and outplayed top competitor Alex Smith as the 49ers beat Aaron Rodgers and the Green Bay Packers 34-6 Saturday night.

O'Sullivan came into training camp third on the depth chart behind Smith, the No. 1 overall pick in the 2005 draft, and Shaun Hill. But O'Sullivan has started both preseason games for the 49ers and gave the best performance of the three in the first half against the Packers.

Rodgers has no competition for the starting job in Green Bay following the trade of Brett Favre to the New York Jets earlier this month. But that doesn't mean he has nothing to prove in the preseason as a quarterback who has never started a regular season game in the NFL.

Rodgers wasn't nearly as sharp as he was in the exhibition opener, going 9-for-18 for 58 yards and failing to get the Packers into the end zone in one half of action. Rodgers didn't get much help from his teammates, as he was sacked four times and his receivers dropped a couple of passes. Green Bay had only 46 total yards of offense in the half.

O'Sullivan got off to another shaky start, throwing an interception to Charles Woodson on San Francisco's third drive of the game. That was his third turnover in seven preseason drives, an alarming rate even at this time of year.

But he looked better once Green Bay's first-team defense started heading to the bench. After hearing some boos from the home crowd following a false start by Jonas Jennings and a timeout call, O'Sullivan connected on a 27-yard pass to Jason Hill on third-and-eight.

He then hit Morgan with a 22-yarder on another third-down play that moved the ball down to the 3, setting up DeShaun Foster's 1-yard score on fourth down.

On San Francisco's next drive, O'Sullivan took advantage of a miscommunication by Green Bay's defense to hit Morgan on a 59-yard scoring strike. O'Sullivan finished 8-for-17 for 154 yards with the touchdown and interception.

Smith played the third quarter and went 5-for-12 for 62 yards. He overthrew Morgan on a deep pass on his first drive and missed an open Hill in the back of the end zone later in the quarter. San Francisco did score a touchdown with Smith at quarterback, when Moran Norris' 1-yard run capped a 16-yard drive set up by a botched snap by Brian Brohm.

Smith finished 5-for-12 for 62 yards in his first matchup against Rodgers since the Niners chose him instead of Rodgers with the No. 1 pick in the 2005 draft. Rodgers slipped all the way to Green Bay at 24, a fall that cost him more than $40 million in his rookie contract and forced him to sit behind Favre for three years.

Rodgers, who grew up in Northern California and played college ball across the bay at Cal, had plenty of friends and family on hand but they didn't have much to cheer about because of the dropped passes.

The most obvious one came on the first play after Woodson's interception, when Donald Lee couldn't hang on to a perfectly placed pass into the end zone. The Packers settled for a field goal on that drive after starting with a first-and-goal from the 7.

Donald Driver also dropped a deep ball on Green Bay's first drive, forcing the Packers to take an offsides penalty instead of a long gain.

Notes:@ Allen Rossum scored on a 67-yard punt return in the fourth quarter for the Niners. ... Packers RB Ryan Grant, LB A.J. Hawk, WR Greg Jennings and DL Ryan Pickett sat the game out. ... The Niners were without WRs Arnaz Battle, Ashley Lelie and Bryant Johnson.