Boston Celtics restricted free agent Jae Crowder has reached agreement on a five-year, $35 million contract to re-sign with the organization, league sources told RealGM.

The Celtics and Dallas Mavericks were leaders in pursuit of Crowder during the first day of free agency, but Crowder and Boston made progress and agreed to terms late Wednesday night.

Crowder, the 34th overall pick in the 2012 NBA draft, spent his first two seasons with the Mavericks before being dealt midway through the year to Boston.

In 57 games for the Celtics, Crowder established himself as a two-way presence for Brad Stevens, averaging 9.5 points, 4.6 rebounds and 1.4 assists in 24.2 minutes per game. He scored 10.8 points and grabbed five rebounds a game in the postseason.

Crowder and the Celtics had long made clear their mutual interest in reuniting, and the 6-foot-6 forward has used the offseason to return to the stellar form he displayed before a season-ending knee injury against the Cleveland Cavaliers in the playoffs.

Out of Marquette, Crowder, 24, has averages of 5.8 points, 2.8 rebounds and one assist in three NBA seasons.