Free agent wide receiver Eddie Royal agreed to a contract with the San Diego Chargers, two days after Royal’s near-deal with the Washington Redskins unraveled.

The Chargers announced that Royal had agreed to a three-year contract but did not immediately disclose the financial terms. One person close to the negotiations said the contract is worth a little more than $13 million, including $6 million guaranteed.

The Redskins had believed Tuesday, on the opening day of free agency, that they had that they had a two-year, $6 million deal two-year deal with Royal, thought to be worth up to $12 million, basically in place. Royal had even texted a Redskins player on Tuesday about his plans to come to Washington.

But the Redskins were unable to apply the official finishing touches to the deal and other teams became involved in the bidding. Royal took a trip to San Diego to visit the Chargers and joined Robert Meachem as free agent wideouts added by the club in an effort to make up for the lost production of the departed Vincent Jackson.

Redskins officials met with Royal over dinner on Tuesday night and remained hopeful of signing him even after the team’s initial push to strike a deal with him fell through.

The Redskins signed free agent wide receivers Pierre Garcon and Josh Morgan on Tuesday but had looked to add a third new receiver as well. There had been speculation that the Redskins might release Santana Moss if they signed Royal. It is not immediately clear if the Redskins will attempt to sign a different free agent wide receiver or simply be content with the players they now have on hand.

Royal spent his first four NFL seasons with the Denver Broncos. He had 91 catches for 980 yards and five touchdowns as a rookie in 2008. But he didn’t have even a 700-yard receiving season in three years in Denver after that, and had only 19 catches for 155 yards and one touchdown in 12 games last season.

More on the Redskins and NFL free agency:

Redskins agree to terms with safety Brandon Meriweather

Guard Ben Grubbs, targeted by Redskins, signs with Saints

Mario Williams, Bills agree to record deal for defensive player

Calvin Johnson credits Peyton Manning and Mom for his record-setting deal