Restricted free agent Marcus Smart has agreed to a four-year, $52 million contract to re-sign with the Boston Celtics, league sources told Yahoo Sports.

After a contentious start to negotiations, Smart’s agent, Happy Walters, and the Celtics’ brass made significant progress in recent days to ensure Smart remained in Boston. Smart and Walters met with the Celtics’ front office and ownership on Thursday in Boston to finalize the agreement, league sources said.

For Smart, the new deal represents more than the range of his extension negotiations before the 2017-18 season (four years, $50 million) and a strong commitment in this year’s free agency market. Smart had an Oct. 1 deadline on the $6.1 million qualifying offer that the Celtics tendered him last month.

Smart, 24, has established himself as part of the Celtics’ core and culture, serving as a tenacious defender, team voice and productive player. Smart met with several teams, including the Brooklyn Nets and Memphis Grizzlies, during the NBA summer league in Las Vegas, but also had a private meeting with Celtics general manager Danny Ainge last week.

A year before dealing with the free agencies of Kyrie Irving and Terry Rozier, the Celtics understood the importance of bringing back Smart on a long-term extension, and the guard has remained loyal and communicative with head coach Brad Stevens and his teammates.

In 54 games last season, Smart averaged 10.2 points, 4.8 assists, 3.5 rebounds and 1.3 steals. He missed time during the season because of a right hand injury after punching a glass frame, and then suffered a torn UCL in his right thumb in mid-March diving for a loose ball. Smart underwent surgery on his right thumb, but returned in the first round of the playoffs.

For Boston, Smart’s resiliency and toughness has permeated the franchise. In 15 postseason games, he averaged 9.8 points, 5.3 assists and 3.7 rebounds in nearly 30 minutes per game.

Smart was Boston’s sixth overall pick in the 2014 NBA draft out of Oklahoma State.

More from Yahoo Sports:

• Why trade to San Antonio stings DeMar DeRozan so much

• Titans DT plans to protest anthem: ‘I’m going to take my fine’

• WWE’s ‘New Day’ releases powerful response to Hulk Hogan’s reinstatement

• Larry Nassar survivors receive Arthur Ashe Courage Award at ESPYs

