SAN FRANCISCO--It was one transaction, one of thousands that take place in the course of every National Football League offseason.

But if the San Francisco 49ers don't trade that sixth-round draft choice March 12 to the Baltimore Ravens for wide receiver Anquan Boldin, they don't outlast the Green Bay Packers on Sunday in their final home opener at dilapidated Candlestick Park.

Boldin was that good, a one-man wrecking crew if you will, in the 49ers' hard-fought 34-28 victory over the mediocre Packers.

Unlike the Packers, whose only veteran newcomer to their roster is Seneca Wallace, the 49ers and general manager Trent Baalke use every personnel avenue in building a team.

At the time, the 49ers were looking for a No. 2 behind Michael Crabtree. Randy Moss retired after the Super Bowl season, and Mario Manningham had blown out his knee in December.

Then Crabtree suffered a torn Achilles' tendon in May. Suddenly, the 32-year-old Boldin, a Super Bowl hero in February, had to be Colin Kaepernick's main man.

So the stage was set Sunday, and it was a savagely contested struggle between two teams that don't much like each other and could meet again in January.

For the third time in 12 months, the 49ers prevailed.

“We came here to win the game,” coach Mike McCarthy said. “I don't know who you think we are. We lost a game that we were capable of winning.”

Last year, Crabtree separated at all the crucial times against Green Bay, hauling in 16 passes for 195 yards (12.2) and two touchdowns.

This time, it was Boldin, with 13 receptions in 17 targeted throws for 208 yards (16.0) and a touchdown.

“Boldin had a hell of a game,” cornerback Sam Shields said. “That was our main thing. We had to stop Boldin.

“They put him in motion, like they used Crabtree. And they put him on the inside.”

Just as coach Jim Harbaugh and offensive coordinator Greg Roman had to make do without Crabtree and Manningham, McCarthy and defensive coordinator Dom Capers had to find ways to compensate for the absence of safety Morgan Burnett and nickel back Casey Hayward.

Neither played because of hamstring injuries suffered two weeks ago in a costly exhibition game against Seattle.

It should be rather obvious which coaching staff did a better job.

Boldin, who ran 40 yards in a slow 4.65 seconds coming out of Florida State in 2003, made the most vital play of the game with 3 minutes left.

Clinging to a 3-point lead, Harbaugh faced fourth and 2 at the Green Bay 36. Deciding against a 54-yard field goal try for Phil Dawson or a punt, Harbaugh called what he termed a “quick hitter right to Anquan in the flat.”

The Packers, however, defended the original route combination. It was then up to Kaepernick.

Escaping to the right, the third-year quarterback making just his 11th start waited and waited. Boldin then put his 225-pound body on 190-pound Tramon Williams, creating exactly the type of separation that enabled him to catch 772 passes for Arizona and Baltimore.

Boldin's final reception, for 15 yards, set up Dawson's 33-yard field goal and left the Packers just 26 seconds to go 80 yards.

Aaron Rodgers got 38 yards on a strike to Randall Cobb, but his planned Hail Mary of 42 yards never got airborne when Aldon Smith belted Rodgers on his delivery.

Offensively, it was the same old for the Packers.

They went nowhere on the ground against almost 100 percent seven-man fronts until one drive in the fourth quarter. In the air, the 49ers covered up their weak nickel back (Nnamdi Asomugha) and rookie free safety (Eric Reid) better than the Packers hid their holes.

Calling the Packers “one of the best teams in football,” Harbaugh added, “I thought the pass rush of the Packers was completely negated by our offensive line.

“(Kaepernick) made some laser-like throws down the field. Pin-point accuracy. Managing the chaos of the game. Never flinched at any time.”

Of course, the Packers entered most concerned about the read-option, Kaepernick's scrambling and preventing Frank Gore from controlling play with another 100-yard game against them.

The read option was rendered null and void. Kaepernick's only scramble of note was for 15 yards. Despite his remarkable resolve, Gore had to settled for 44 yards in 21 carries.

“We did great against the read-option,” defensive end C.J. Wilson said. “More than anything, the linebackers took the quarterback, we took the dive and the pitch was the corners. Everybody does their job, that's how you stop the read-option.”

Playing more than half the game in their 3-4, the Packers' front three of Ryan Pickett, surprise starter Johnny Jolly and Raji stood their ground and made Gore earn every single yard.

As Clay Matthews put it, “One thing I can say about this defense is that I felt we put it all out there. You can see the emotions of these guys in this room. It is devastating...but we will rebound from this. We will remember what this feels like and be stronger.”

Having won in three of four vital areas on defense, the Packers utterly failed to handle the 49ers' motley collection of four wide receivers. Boldin was the only threat outside, and tight end Vernon Davis was the only threat inside.

Safeties M.D. Jennings and Jerron McMillian tried playing a cat-and-mouse game with Kaepernick. They appeared to be constantly checking late in the play clock, trying to deceive the quarterback and his untested corps of wideouts.

Instead, the Packers never looked settled themselves in the back end.

Some of the 49ers' eight pass plays for 20 yards or more were the result of beating people.

Nickel back Micah Hyde lost leverage and couldn't catch up on gains of 22 by Boldin and 37 by Davis.

McMillian and Williams had a mixup in a classic Cover 2 sideline toss to Boldin for 22. Boldin made a fabulous catch for 22 against Sam Shields and McMillian. There was confusion between Shields and M.D. Jennings on a 30-yard pass to Boldin.

When the Packers took their only lead, 28-24, with 8½ minutes left, Shields and McMillian inexcusably missed the tackle on a 13-yard pass on second and 9 to Boldin that ruptured into 43 and quickly set up the go-ahead TD.

The 49ers drew first blood when their coaches successfully matched Davis on Jennings and the result was a 20-yard score. A few plays before that, it appeared that Brad Jones was out of position on a 25-yard strike to tight end Vance McDonald.

Add it up and Kaepernick's 412 yards passing was just bad football on the part of Green Bay.

“We had him doubled at times,” McCarthy said, referring to Boldin. “He made plays. Big plays are a huge factor in winning in this league.”

Those big plays wouldn't have been made had it not been for Baalke making a bold move and assuming the final year of Boldin's contract worth $6 million.