The Raiders and Seahawks agreed to a trade that allows running back Marshawn Lynch to play in Oakland, the Raiders announced Wednesday.

To acquire Lynch, Oakland sent Seattle its fifth-round draft pick in the 2018 draft while also getting the Seahawks' 2018 sixth-round pick in return.

Lynch and the Raiders have an agreement for a two-year contract in place, league sources told ESPN's Adam Schefter.

Lynch, who retired after the 2015 season, was born and raised in Oakland. The Raiders will play there for at least the next two seasons before moving to Las Vegas.

Raiders quarterback Derek Carr said he was looking forward to Lynch joining the Raiders.

"He's one heck of a football player, and I hope to play with him. ... Of course, anyone would want Marshawn Lynch, any quarterback in the NFL," Carr said last week. "As we add pieces, we'll hug them up and bring them in just as a family and treat them the same way that we do with all of our other teammates."

Defensive end Khalil Mack had high praise for his future teammate, calling him the most physical player he has faced.

"Marshawn is one of the best running backs I've ever played against in my short career so far," Mack said. "You talk about a player, a hell of a player. It would be a great, great, great treat to have him on this side, on the dark side."

Marshawn Lynch is on track to play in Oakland as the Raiders and Seahawks have agreed to a trade. Oakland Raiders

Lynch, who turned 31 on Saturday and was the No. 12 pick of the 2007 draft by the Buffalo Bills out of Cal, has rushed for 9,112 yards and 74 touchdowns in nine NFL seasons. Injuries, though, limited him to seven games in 2015, when he averaged 3.8 yards per carry.

The Raiders, who had the No. 6 rushing attack in the NFL last season, seem to think a year off did Lynch, who is 5-foot-11, 215 pounds, some good in terms of his health. Oakland needs a big lead back after it allowed Latavius Murray to depart for the Minnesota Vikings in free agency with 5-foot-8 backs Jalen Richard and DeAndre Washington entering their second seasons.

Lynch is a five-time Pro Bowler and 2012 first-team All-Pro, when he rushed for 1,590 yards and 11 touchdowns while catching 23 passes for 196 yards and a touchdown. He led the NFL with 12 rushing touchdowns in 2013 and 13 rushing touchdowns in 2014 and ran for at least 1,200 yards in four straight seasons from 2011 through 2014.

Despite missing all of last season, Lynch ranks second in the NFL in rushing touchdowns since 2007 with 74 scores, second to new New Orleans Saints running back Adrian Peterson's 97 touchdowns, according to ESPN Stats & Information. And since Lynch joined the Seahawks in 2010, only Peterson has more rushing yards after contact.