PORTLAND, Ore. (AP) The Portland Trail Blazers have agreed to a four-year deal with restricted free agent Maurice Harkless.

The $40 million deal was first reported by Yahoo Sports. Harkless confirmed it on Twitter, posting: ''4moe' ..... God is so good. Thank you (hashtag) ripcity.''

The Blazers acquired Harkless in a trade with the Orlando Magic and he averaged 6.3 points and 3.6 rebounds in 78 games overall last season. He filled a key role late in the regular season when Meyers Leonard injured his shoulder, and averaged 12 points and 6.5 rebounds over the final 11 games.

More from FoxSports

Harkless, who played one season at St. Johns, was the 15th overall pick in the 2012 draft by Philadelphia. He was traded to Orlando before the 2012-13 season in the same deal that sent Dwight Howard to the Lakers.