Shavlik Randolph will sign with the Boston Celtics for the rest of the season with a team option on his contract for next season, a league source told RealGM.

With Randolph’s second 10-day contract expiring on Wednesday night, the Celtics decided to keep the 6-foot-10 forward to maintain their frontcourt depth and continuity in the locker room.

Randolph has played in three of the Celtics’ last four games, posting a combined 10 points, 12 rebounds and two steals in two matchups against the Charlotte Bobcats last week.

After a dominant run in China, Randolph, 29, signed his first 10-day deal with the Celtics on March 1 and a second on March 11.

The Celtics also kept D.J. White for the remainder of the season on Wednesday.