Updated

Pro Bowl running back Ray Rice happily shed his franchise tag Monday after reaching agreement with the Baltimore Ravens on a new five-year contract worth roughly $40 million.

The Ravens and Rice, their most versatile offensive weapon, went down to the 4 p.m. deadline before hammering out the deal. Had Rice not signed, he would have played the 2012 season under the $7.7 million franchise tag tender.

Instead, he will get $17 million this year and $8 million in 2013.

Baltimore has made the playoffs in each of Rice's four seasons, twice advancing to the AFC title game. He earned his second Pro Bowl invite last year after leading the NFL with 2,068 yards from scrimmage, including a career-high 1,364 yards rushing. He also scored a career-best 15 touchdowns.

Since being drafted out of Rutgers in the second round of the 2008 draft, Rice leads the NFL in receptions and yards receiving by a running back. He's had 250 catches for 2,235 yards during that span.

Off the field, he's been associated with several charitable organizations.

Quite simply, the Ravens weren't about to let him get away

"This is another example of (owner) Steve Bisciotti's commitment to the team and to our fans to retain our core players," Ravens general manager Ozzie Newsome said. "Ray has been an integral part of us earning the playoffs in each of his four seasons. His production on the field speaks for itself, and his leadership in the locker room is outstanding.

"I should say something about his community efforts; I think they are almost unmatched by any player in the NFL," Newsome said. "You'd have a hard time finding a player who does more or is as serious about helping others as Ray is. He is one of those players you can proudly say, 'He's on our team.' "

As Baltimore's franchise player, Rice would not have been required to report at the start of training camp. The Ravens will hold their first full squad workout July 26, and Rice is expected to attend.

In 61 career games, he ranks second in franchise history in yards rushing (4,377) and yards from scrimmage (6,612).

Veteran running back Ricky Williams, who played behind Rice in 2011 and retired during the offseason, was impressed with Rice's talent and passion for the game.

"He's got all the God-given ability, but he also works hard," Williams said late last year. "It's rare to find that combination. In my mind, there's only one way to have success, and that's to work hard and have a little bit of talent. He's got both."