Clearly, LeBron James’ visit was all the Jazz needed to save their December.

The King’s annual arrival with the Cleveland Cavaliers concluded the the Jazz’s toughest month of the schedule, during a week when they showed signs of having worn down and lost confidence after some disastrous showings on the road.

You never would have known what they’ve gone through lately, judging by this showing Saturday night at Vivint Smart Home Arena: Jazz 104, Cavs 101.

Wow. Where did that come from? Even during a first-quarter timeout, Jazz coach Quin Snyder was feeling overwhelmed. The volume of problems made him say to his players, “There’s too much for me to tell you.”

In the end, he had a long list of players to praise — starting with rookie guard Donovan Mitchell, who matched James with 29 points and delivered a driving layup in traffic, with Cleveland having stormed back to within one point in the last minute. “Obviously,” Snyder said, “a timely shot.”

Yeah, you could say that. How much did the Jazz need this victory? Going into Saturday’s game, they stood 4-10 in December, with a schedule judged as the most difficult any NBA team would face in any month this season. The Jazz lost so badly at Denver and Golden State right after Christmas that even Snyder, who never overreacts to anything, was acknowledging the potential effects of playing so many of the league’s best teams lately.

“We wouldn’t be human if you didn’t feel that on some level,” Snyder said before the game. “I do think this month will make us better, but that’s something that’s hard to hang onto. … I don’t sense us being incredibly despondent. But that doesn’t mean there’s not some psychological toll.”

That’s exactly what made this win so impressive. The Jazz could have wobbled when they trailed by 14 points in the second quarter, or when they lost nearly all of a 15-point lead in the second half. “We’ve just got a tough-minded group of guys,” Derrick Favors said. “We don’t let losing get us down.”

With his growth of a beard in its early stages, Snyder looks like someone who has wandered through the woods for a few days. That’s kind of what December has been like for his team.

The month sure ended well, though. Saturday’s outcome would seem more surprising, except the Jazz do this every year. Even some lousy Jazz teams in this decade have beaten LeBron’s Miami and Cleveland teams, with the team’s home-court streak now at seven wins against him.

James was well aware of that history, addressing it after the morning shootaround on his 33rd birthday. And then he went out and scored 20 points in the first half, finishing with a tough turnaround shot at the buzzer for a 53-48 lead.

Suddenly, a Jazz team that’s known to fade in third quarters started dominating this exercise. They opened the period with a 23-3 run and led by 15 points. The Cavs cut the lead to seven by the end of the quarter, with James resting, and it became evident that the Jazz would have to earn the win.

They proceeded to do it. The Jazz had answers for everything LeBron threw at them in the fourth quarter, including a series of clutch baskets and assists from Mitchell, who outscored James 18-9 in the second half. In the game’s most critical sequence, the rookie missed a 3-point try, but then came back with his big drive before James somehow missed an inside shot.

Free throws took care of the other details, and the Jazz (16-21) could feel good about themselves after beating Boston, San Antonio and Cleveland in the second half of the month. Those intermittent breakthroughs kept their season from crumbling.

The Jazz managed to stay within 2½ games of New Orleans for the last playoff spot in the Western Conference, with the Pelicans coming to town Wednesday. They survived a month when Rudy Gobert appeared in only six games, while his teammates ran into one elite opponent after another.

Cleveland is one of them, and the Jazz competed favorably in two December meetings with the Cavs. They won the home half of that scheduling sequence – as always, and just in time.