MIAMI -- The Miami Dolphins released two linebackers Friday and successfully courted a third, Karlos Dansby.

One of big prizes on this year's market, Dansby reached an agreement with Miami on a five-year deal after visiting the Dolphins in the opening hours of NFL free agency. Dansby's contract is worth $43 million, and a league source told ESPN NFL Insider Adam Schefter that includes $22 million in guaranteed money, which makes him one of the highest paid inside linebackers in the game.

A second-round draft pick by Arizona in 2004, Dansby has started since his rookie season. He made one of the most memorable plays in this year's playoffs, returning Aaron Rodgers' fumble 17 yards for a touchdown to give the Cardinals a 51-45 overtime victory over the Green Bay Packers.

The Dolphins terminated the contracts of disgruntled outside linebacker Joey Porter, inside linebacker Akin Ayodele and free safety Gibril Wilson.

Dansby became an unrestricted free agent after six seasons with Arizona. He played inside linebacker last season for the NFC West champions and can also play outside linebacker.

Porter, a four-time Pro Bowler chosen in January to the NFL's All-Decade team, was released last month but reverted to the Miami roster because of a salary cap technicality. He had campaigned to be released while complaining about his reduced role last season and his relationship with coach Tony Sparano.

Wilson was a flop in his only season with the Dolphins. He received $8 million guaranteed when he signed a year ago.

Ayodele was a two-year starter at inside linebacker, but Dansby offers more big-play ability. The former Cardinals star has 25½ career sacks, 10 interceptions, 12 fumbles forced and nine fumbles recovered.

As Friday's moves made clear, the Bill Parcells regime is eager to improve a defense that last year gave up a franchise-record 140 points in the fourth quarter, most in the NFL. In the final three games, desperate to stay in the playoff race, the Dolphins fell behind 24-6, 27-0 and 27-10.

Miami fired defensive coordinator Paul Pasqualoni in January and replaced him with Mike Nolan.

The Associated Press contributed to this story.