Free-agent center Mo Bamba is set to return to the Orlando Magic after agreeing to a two-year deal on Thursday. According to Yahoo! Sports' Chris Haynes, Bamba will stay put in Orlando and pocket $21 million over the course of his new two-year contract, which was inked just after the free agency period began on June 30.

There was some belief that the Magic were going to move on from Bamba this offseason when they declined his contract option and let him hit free agency. Instead, Orlando was able to bring back the former first-round pick on a low-risk, two-year deal.

Bamba averaged 10.6 points, 8.1 rebounds, and 1.7 blocks per game last year for the Magic. He featured in 71 games, starting 69, and averaged 25.7 minutes per night. The 24-year-old shot a career-high 38.1% from 3-point range last year, knocking down 1.5 per game.

He'll be just 26 years old at the end of his new contract, which would put him in line for another big payday if he can continue to improve on his 2021-22 season. The short-term deal leaves Orlando with little risk if Bamba doesn't pan out as they're hoping, only having him on the books for two seasons.

Bamba was the No. 6 overall pick in the 2018 NBA Draft out of the University of Texas.

The Magic had been rumored to be interested in Isaiah Hartenstein in free agency as a potential replacement for Bamba, but the team ended up bringing back their former first-rounder for another stint. Hartenstein ended up latching on with the New York Knicks, where he'll earn $16.7 million over two years.