ALAMEDA, Calif. (AP) — The Oakland Raiders have agreed to a two-year contract to bring running back Marshawn Lynch out of retirement.

A person familiar with the deal told The Associated Press that the sides have agreed on the terms pending a physical for Lynch on Wednesday. The person spoke to the AP on condition of anonymity because the contract has not been finalized. NFL Network first reported the deal.

Once Lynch passes the physical, the Raiders will need to acquire his rights in a trade with Seattle. That's expected to be mostly a formality because the Seahawks don't want to pay Lynch the $9 million he would be owed when he comes out of retirement. The teams are expected to swap late-round draft picks in 2018.

Lynch also must apply to the NFL for reinstatement from the retired list before he can play with the Raiders. NFL Network said Lynch would get a $3 million base deal this season, with a chance to make an additional $2 million if he rushes for at least 1,000 yards.

Lynch retired following the 2015 season but decided he wanted to come back and play with his hometown team. The Raiders met with him early this month to gauge his interest and wanted to get a deal done before the draft.

The Raiders have a need for a power running back after losing Latavius Murray in free agency. Second-year backs Jalen Richard and DeAndre Washington are both smaller backs and are not as suited to short-yardage and goal-line situations.

"Marshawn is one of the best running backs I've ever played against in my short career so far," Raiders defensive end Khalil Mack said last week. "It would be a great, great, great treat to have him on this side, on the dark side."

Lynch was perhaps the best power back in the league before he retired. He had double digits in touchdown runs every season from 2011 to 2014, and his 51 TDs on the ground are the most in the NFL since 2011 despite playing just seven games in 2015 and being retired last season.

12352618069?profile=original

The 31-year-old Lynch averaged 3.8 yards per carry in his limited action in 2015 before retiring. Before that, he was one of the game's top running backs, with more than 1,200 yards rushing in each of the previous four seasons.

"I think he's the most physical guy I've played against," Mack said. "I remember playing against him, I believe, my second season. They ran a power right at me. I remember that play. You're talking about one of the most physical guys I've played against, running back-wise."

His production in Oakland should be helped by running behind a line that had three Pro Bowlers last season in left tackle Donald Penn, left guard Kelechi Osemele and center Rodney Hudson. In his final year with the Seahawks, Lynch averaged just 1.1 yards per carry before contact, the lowest for any back with at least 100 carries, according to Pro Football Focus.

For his career, Lynch has rushed for 9,112 yards and 74 touchdowns.

Lynch was born and raised in Oakland and played college ball nearby at California. He still has strong ties to the area through his Beast Mode company and would be a welcome addition for a fan base still stung by the team's move to Las Vegas for the 2020 season.

___

More AP NFL: http://pro32.ap.org/articles and https://twitter.com/AP_NFL