TAMPA, Fla. (AP) — The Tampa Bay Buccaneers targeted Dashon Goldson long before the All-Pro became the most coveted safety in free agency.

Bolstering one of the worst pass defenses in the NFL was a goal when general manager Mark Dominik was unable to trade for the former San Francisco 49ers standout before last year's draft. It became even bigger a priority after the Bucs nearly set a league record for yards allowed through the air the following season.

Dominik and coach Greg Schiano still feel Goldson could be one of the answers to getting better, and they landed their man Wednesday with a $41.25 million, five-year contract.

"We had our eyes on him for a while, and certainly when you watch his tape, you see as a coach the things you want in your safety," Schiano said.

"Just as important, when you have a chance to visit with him finally, you find he understands exactly what as a head coach I'm looking for," Schiano added. "He's going to come in here and be a leader and be a guy that understands what it takes to be a championship football team."

Goldson spent the past two seasons on one-year contracts with the NFC champion 49ers, including last year with the franchise tag for $6.2 million. Goldson made it clear he sought a long-term deal for his future security.

With the Bucs, he'll receive $8.25 million per year and $22 million in guaranteed money, a person with knowledge of the contract said, speaking on condition of anonymity to The Associated Press because the terms weren't announced.

"Hard work really pays off. I remember signing up to play football, hiding it from my mom," as a youngster growing up in Harbor City, Calif. "My journey, I wouldn't say it was rough, but it was a little rocky."

The 28-year-old Goldson, known as a big hitter with a nose for the football in pass coverage, had 69 tackles, three interceptions and a forced fumble for San Francisco last year in his sixth NFL season.

Tampa Bay is counting on Goldson to boost a defense that allowed the fewest yards rushing in the NFL, while also coming within 37 yards of yielding the most yards passing in league history.

"I did some research and sat with my agent, trying to figure out where was the correct fit for my style of play, my mindset. Tampa came on my radar," said Goldson, who was flown to town late Tuesday on a private jet provided by the Bucs. They who used a similar game plan to snare receiver Vincent Jackson, guard Carl Nicks and cornerback Eric Wright on the first day of free agency a year ago.

"I was very thankful I didn't get the franchise tag again, just so I could see my opportunities out there," Goldson added. "I think this is the correct fit. I really truly believe that. It was time to go somewhere that really, really wanted me."

While 49ers coach Jim Harbaugh said two days after a 34-31 Super Bowl loss to Baltimore that retaining Goldson was a top priority, San Francisco had already begun to move on Wednesday as free agent Charles Woodson met with the team.

Goldson had a career-best six interceptions during the 2011 season, when the 49ers ended a franchise-worst stretch of eight years without a playoff berth or winning record. In the postseason, Goldson has 47 tackles, an interception and a forced fumble.

"Big ups to my boy (at)thehawk38," 49ers linebacker Larry Grant posted on Twitter. "Man it's definitely well deserved and a long time coming folks. Congrats to you my boy."

Added San Francisco safety Donte Whitner: "Congrats to my bro (at)thehawk38 on his new deal with Tampa! You will be missed."

Goldson was a fourth-round draft pick by the 49ers in 2007 out of Washington. He became a starter in '09.

He joins a team that dropped five of its final six games to finish 7-9 last season. The Bucs have missed the playoffs the past five seasons and haven't won a postseason game since winning the Super Bowl 10 years ago.

That doesn't bother Goldson, who joined the 49ers before they started winning consistently again.

"I was there six years. We started from the bottom," the safety said. "It didn't happen overnight to get to where we were the past couple of years. I definitely see the potential here."

Goldson also was looking forward to lending his experience to help develop fellow safety Mark Barron, last year's first-round draft pick. His arrival also raises questions about the future of five-time Pro Bowl selection Ronde Barber, who made the transition from cornerback to safety last season.

Barber is a free agent, and the Bucs are waiting to hear if he wants to retire or return for a 17th season.

"We're going to wait and see what Ronde feels. That's been the thing we talked about," Schiano said. "But this day is about Dashon. I'm going to let Ronde make his decision and we'll celebrate Dashon's signing and everything that goes with that."


AP Sports Writer Janie McCauley in San Francisco contributed to this story.