The Spurs had just survived a 119-113 victory over Cleveland, and coach Gregg Popovich was not a happy camper.

“I’m very disappointed in our defensive execution the last two or three weeks, after we raised our stock from being a middle-of-the-road defensive team last year to one of the top two or three this year,” Popovich said on March 16.

“Then in the last three weeks, we decide to toss it like it’s not important.”

Since that defensive nadir, the Spurs have gone back to the drawing board, back to the basics and back to what their coach has always deemed most important to championship aspirations.

Defense.

During the past three games — wins over Golden State and Utah and especially in a 96-95 loss at Houston on Sunday — the Spurs have produced performances more in line with the defensive renaissance Popovich sought and, in large part, has received this season.

Heading into tonight’s game against high-powered Denver, the Spurs rank third in the NBA in defensive efficiency — a measure of points allowed per 100 possessions — after ranking 20th last season.

The Spurs are one of two teams, along with Oklahoma City, to have a top-7 rating on both offense and defense.

“Defense has been on and off,” forward Stephen Jackson said. “We haven’t been consistent with it. That’s what we want, to get consistent before the playoffs. We can score points. We can knock down shots. Defense is what we hang our hat on.”

With three high-octane teams visiting the AT&T Center this week — the Nuggets, Los Angeles Clippers and Miami Heat are all top-5 offensive teams — the Spurs’ continued defensive resurgence will be key to survival.

In the three games since the scoreboard-spinning win over the Cavaliers, who haven’t topped 95 points since, the Spurs have allowed an average of 95.3 points on 42.3 percent shooting.

In Sunday’s loss to the Rockets, the Spurs held the NBA’s highest-scoring team 10 points below its average, an encouraging outcome even in defeat.

Spurs players trace their defensive bounce-back to a couple of “refresher course” practices after the Cleveland game.

“Just practicing it, our rotations, our traps, who is the help-side person on defense,” said small forward Kawhi Leonard, the team’s star wing defender. “Just buying into that and bringing it to the game.”