Adrian Peterson, the Redskins' most productive offensive player last year, has agreed to return on a two-year contract. (John McDonnell/The Washington Post)

Running back Adrian Peterson, who revived his career by running for 1,042 yards last season, agreed on a contract to return to the Washington Redskins on Wednesday. A person familiar with the deal, who spoke on the condition of anonymity, said it will be for two years and $8 million.

He is expected to sign the contract Thursday.

Peterson, 33, was a desperation signing by Washington late last August after injuries left the team precariously thin at running back. Unwanted by other teams, he dazzled coaches and executives with a tryout that is still legend around the franchise and then proceeded to be the Redskins’ most productive offensive player, rushing for at least 96 yards in seven games. He also had seven touchdowns, including a 90-yard score at Philadelphia on “Monday Night Football.”

The agreement with Peterson came on the same day the NFL’s free agency period opened, allowing the team to announce the previously reported trade for former Broncos quarterback Case Keenum and signing of former Giants safety Landon Collins to a six-year, $84 million contract with $45 million guaranteed.

"With only Colt [McCoy] on our roster, we had to do something,” Coach Jay Gruden said of the Keenum acquisition, via the team’s website. “We still may address it in the draft. Who knows? But we have to have two quarterbacks in OTAs and for someone to come in here and compete with Colt. We all feel great about Colt without a doubt but he’s had his injury history as well, and we anticipate a competitive camp with those two guys. . . . I feel good about Colt and Case’s skill set; they are very similar, so it’ll be easy to draw up plays for those two guys.”

The team announced an introductory news conference for Collins at 2 p.m. on Thursday.

Despite his big season, Peterson’s return was not a certainty. Promising second-year player Derrius Guice is recovering from a torn ACL that wiped out his entire rookie season. A healthy Guice presumably will take many of the carries that belonged to Peterson last fall. Peterson also will have to share time with third-down back Chris Thompson, who should be recovered from rib injuries that kept him off the field for just 10 games.

Gruden joked several times about the death glares Peterson gave him when the coach kept him on the sidelines at certain points during games. But it was hard to sit Peterson long. He played through several injuries, including a sprained ankle, sore hamstring and two separated shoulders. In several of the team’s seven victories, he took over in the fourth quarter, chewing up both yardage and time off the game clock.

Despite being a future Hall of Famer whose 13,318 rushing yards are eighth all time in the NFL, Peterson did not have a huge market this offseason. His career appeared to be in jeopardy last summer when no teams showed interest in signing him, and he spent July and most of August working out at the Houston training facility he owns with Redskins tackle Trent Williams. He hadn’t rushed for 1,000 yards since 2015, and many in the league thought he was too old to be a star back.

Even after last season’s breakthrough, interest from other teams was mild this offseason. Peterson seemed comfortable in Washington and coaches and teammates appeared to appreciate the way he fit into the locker room, by helping several of his younger teammates and adapting to an offense that throws to running backs more than others in which he had played.

Peterson’s deal is an economical one for the Redskins who will give him a $1.5 million signing bonus and a $1.3 million salary in 2019. His 2020 salary will be $2.25 million. He also gets $1.5 million in incentives each year he rushes for 1,000 yards or scores 10 touchdowns.

After the Redskins’ final game, a loss to Philadelphia, Peterson addressed the team, telling the players he wanted to see them work harder in the offseason and encouraged them to train with him. When asked later that day if he wanted to return to Washington, he nodded.

“Hopefully, I’m back here,” he said then. “I want to be a part of what I see we could be as a team and as an organization. I definitely want to be a part of it. That’s what I’m going to continue to keep my mind on.”

More Redskins coverage:

Redskins agree to sign former Giants safety Landon Collins for six years, $84 million

No, Stephen A. Smith, Redskins punter Tress Way did not start a game at quarterback

Preston Smith agrees to contract with the Green Bay Packers

Svrluga: Landon Collins is a good player, so why the raised eyebrows? Redskins history.