Ben Gordon is officially a member of the Orlando Magic.

The team announced Friday morning that it has signed Gordon to a free-agent contract.

Gordon, a 31-year-old shooting guard, signed a two-year, $9 million deal in which the final season is fully unguaranteed if he’s waived before July 1, 2015.

The team also has reached an agreement with power forward Channing Frye.

Gordon’s career has taken a downturn in recent years. The spiral accelerated after the Charlotte Bobcats acquired him as a throw-in in a trade with the Detroit Pistons. During the 2012-13 season, Gordon clashed with rookie coach Mike Dunlap, who had come to the NBA from college basketball. Last season, even though Dunlap had been replaced by Steve Clifford, Gordon failed to crack the playing rotation.

The team released him in early March.

Magic officials likely view his signing as a minimal risk, and they likely want someone who can shoot from distance and provide scoring.

“I still have an opportunity to play some really good basketball,” Gordon said a couple of days ago.