CLEVELAND, Ohio — The Cavs will open free agency by bringing back one of their own.

A league source told cleveland.com that unrestricted free agent shooting guard Sam Merrill intends to sign a four-year, $38 million contract to stay in Cleveland.

Even though the NBA free agency moratorium period doesn’t begin until Monday at 6 p.m., the Cavs were able to negotiate with Merrill in advance because he is their own free agent and also extension-eligible. The deal could become official before July 6.

Merrill, 29, is the Cavaliers’ latest player development success story.

The last pick of the 2020 NBA Draft, Merrill began his professional career in Milwaukee before joining the Memphis Grizzlies. Then in 2022, Merrill became the No. 1 overall pick in the G League draft, selected by the Cleveland Charge — the Cavaliers’ G League affiliate — and joining the team for training camp. After about five months in the G League, Merrill received a promotion, originally signing a 10-day contract that turned into a standard multi-year deal.

This past season, his second full-time campaign with the Cavs, Merrill averaged 7.2 points on 40.6% from the field and 37.2% from 3-point range while playing a career-high 19.7 minutes.

Known for his prolific outside shooting, gravity, deft cutting and improved defense, Merrill became a trusted piece of head coach Kenny Atkinson’s rotation, playing part in Cleveland finishing with a 64-18 record, the best in the Eastern Conference. The Cavs also had the league’s top-ranked offense and soared up the 3-point rankings.

Prior to Saturday’s agreement, the Cavs were projected to have nearly $240 million in salary commitments for next season — a number that puts them more than $21 million over the league’s restrictive second apron and deep into the luxury tax.

With Merrill locked up, the Cavs have a difficult financial decision to make on Sixth Man of the Year finalist Ty Jerome. That bloated salary cap, and the limited available resources, had the Cavs entering the offseason with a plan to keep Merrill and Jerome — if fiscally possible.

But in recent days, there has been a pessimistic tone coming from the organization about retaining both. Jerome is expected to receive a lucrative pay raise that could approach $12-14 million annually — a figure that Cleveland may not be comfortable with given its current financial situation, especially if it’s a three- or four-year commitment.

In anticipation of Jerome’s potential departure, a few hours before finalizing negotiations with Merrill, the Cavs agreed to a Saturday afternoon trade with the Chicago Bulls, acquiring supersized guard — and 2017 second-overall pick — Lonzo Ball in exchange for swingman Isaac Okoro. A few nights earlier, Cleveland selected combo guard Tyrese Proctor with the No. 49 pick, adding another layer of security, protection, insurance and depth at the guard spot.