SAN FRANCISCO >> Moses Moody committed to the team that has yet to commit to him on the court.

Moody, 22, agreed to a three-year, $39 million contract extension with the Warriors, league sources confirmed Sunday night. At roughly $13 million per year, he’ll be under team control for the next four years at below the non-taxpayer midlevel exception on an average annual basis.

ESPN was the first to report the deal, which will keep Moody under contract through the 2027-28 season.

The deal beat today’s deadline for Moody and Jonathan Kuminga to sign contract extensions. Now it’s just Kuminga who has until 3 p.m. to reach an agreement with the Warriors, or else head for restricted free agency at season’s end.

“I’d love to have them both here long-term,” head coach Steve Kerr said of Moody and Kuminga on Sunday afternoon. “Because they’re both great to coach and they’re both getting better and better all the time. For me as a coach, when I see my players sign contracts that are life-changing, it’s really gratifying. That’s a big part of this job, is to help these guys become the best players they can be and to be able to take care of their families.

“I hope we get them both done, we’ll see how it plays out.”

In 181 regular season games, Moody has averaged 5.9 points and 2.1 rebounds per game. A career 36.2% shooter from behind the 3-point arc, Moody has looked much more confident handling the ball and creating his own shot during the preseason.

When given opportunities in the past three years, Moody has produced. He was effective in spot minutes in Golden State’s 2022 playoff series against the Mavericks and also played well in 12 postseason games in 2023. In his last 24 games played last season, he posted eight double-digit scoring games.

But Moody has frequently been the odd-man out of Kerr’s rotations. He got DNPs in seven games last year, was inactive for nine more and played fewer than 15 minutes in 21 games.

Even as his role has fluctuated, Moody has never complained. Kerr and the Warriors have always raved about the wing’s professionalism and maturity.

Moody worked on his 3-point shot — particularly quickening the release — and his ability to move efficiently this summer. The results were clear in Summer League and then in the preseason, when Moody scored the second-most points in the NBA while leading the Warriors.

“He’s playing great,” Kerr said recently. “He’s gotten so much better in so many ways. We’ve always loved his character, his work ethic. This is the most confidence he’s played with.”

Even entering this year, though, Moody’s role is uncertain.

He’s one of 13 Warriors Kerr is comfortable playing, but the team only wants to play a 10-man rotation. On the wing, he’ll likely compete for bench minutes with Buddy Hield, Gary Payton II, Lindy Waters III.

“We’re sitting in that coaches room every day saying: ‘How are we going to play all these guys?’ Because they all deserve to play.”

By extending Moody before Monday’s deadline, it will be more difficult for the Warriors to package him in a trade because of the poison pill provision. His outgoing salary counts as his 2024 salary of $5.8 million, while his incoming salary counts as $11.2 million (related to his extension figure). That makes matching salaries more complicated, but not impossible.

Warriors general manager Mike Dunleavy Jr. has said that the team wanted to keep both Moody and Kuminga. If the team doesn’t get a deal done with Kuminga, he’d become a restricted free agent at the end of the 2024-25 season, giving the Warriors the opportunity to match any offer sheet he signs.

Kerr had met with each player in recent days to share his advice. While he has some level of input on Golden State’s personnel decisions, trades and signings are the job of Dunleavy Jr. and the rest of his front office. Kerr, in discussions with Kuminga and Moody, can dole out his wisdom.

“I trust Mike and his group, and I talk to my players,” Kerr said after Sunday’s practice. “Because those are the guys I’m coaching and leading and helping. So I’d really love if both guys signed extensions.

“But I also understand they have to weigh the pros and cons.”

Kerr doesn’t envy Dunleavy and the job of a general manager. As general manager of the Suns from 2007 to 2010, Kerr has experience negotiating contracts and talking with agents. But he doesn’t miss it.

Kuminga was the higher-touted prospect, got more and more opportunities as he developed, blossoming into a 16.1 points-per-game scorer.

Not signing an extension means Kuminga could potentially earn more — either with the Warriors or otherwise — in restricted free agency.

Golden State would have the chance to match any offer sheet they sign, but a team could be willing to pay either wing more than the Warriors are comfortable with. As of now, only the Brooklyn Nets are projected to have more than $30 million in cap space next summer.

It’s a major decision for both, and certainly not a clear-cut one. Kevon Looney, a veteran presence in Golden State’s locker room, said his message to the young forwards would be to control what they can control.