The Memphis Grizzlies and All-Star forward Zach Randolph have agreed on a two-year, $20 million extension.

According to ESPN, the two sides confirmed they had reached an agreement on Friday, just days before Randolph had the option of opting out of his deal. The announcement comes just hours after reports surfaced indicating the two sides had reached an impasse and Randolph was considering leaving the organization he's called home the past five seasons.

"It's cool, man," Randolph told The Memphis Commercial Appeal. "This is where I want to be."

Zach Randolph, Memphis Grizzlies in talks

ESPN previously reported the Grizzlies were committed to trying to secure a deal with Randolph before July 1, adding that the 32-year-old will invoke his player option and be paid $16.5 million for next season, followed by two more seasons at an average of $10 million per year.

A 13-year veteran, Randolph averaged 17.4 points and 10.1 rebounds last season, leading Memphis and first-year coach Dave Joerger to a 50-win season despite star center Marc Gasol missing significant time with a knee injury.

Zach Rndolph suspended For Game 7 of Thunder series

Randolph has made no secret of his desire to finish his career with the Grizzlies, recently telling ESPN he hopes to establish a long-term relationship with the organization similar to what Tim Duncan and Dirk Nowitzki have in San Antonio and Dallas, respectively.

Randolph's best NBA season was with Portland in 2006-07 when he averaged 24 points, 10 rebounds and two assists. During his time in Memphis, Randolph has averaged 16 points and more than 10 rebounds.