NEW YORK — On Thursday night, Chaz Williams saved the University of Massachusetts basketball team from a sure NIT fate.

On Friday, he helped them get one step closer to an NCAA Tournament berth.

Williams put on a virtuosic 28-point performance in sixth-seeded UMass’ 79-74 upset of third-seeded Temple in the quarterfinals of the Atlantic 10 Championship on Friday at Barclays Center.

The Minutemen (21-10) bounced the Owls (23-9) in the quarterfinal round for the second straight season, and set up a rematch with Virginia Commonwealth in Saturday’s semifinal.

The 5-foot-9 Brooklyn native fired up his hometown crowd with eight straight UMass points — the middle portion of a 12-4 run that allowed UMass to turn a five-point deficit into a 67-64 lead with 4:21 remaining.

“We were kind of going through a cold spell,” Williams said of his scoring run, which included two absurdly acrobatic drives to the rim through heavy traffic. “I was just basically doing what the team needed me to do.”

After two Khalif Wyatt free throws for Temple, Cady Lalanne saved a possession by pegging the ball off of the Owls’ Jake O’Brien as he fell out of bounds. The under-four media timeout came after the whistle, and Williams — who had scored 26 at that point — stood doubled over in exhaustion.

“I was asking Coach to sub me out, and that media timeout was coming so he left me in,” Williams said.

Terrell Vinson hit one free throw to give UMass a two-point lead before Freddie Riley nailed a 3-pointer from the right elbow to make it 71-66 with 1:31 to go.

Wyatt — who struggled to 19 points on 4-for-19 shooting — hit a 3-pointer despite a defender all over him with 55 seconds to play to bring Temple back within one possession.

It figured to be Williams who finished the job, but instead it was Vinson who took the dagger out of its holster and drove it through the Owls’ hearts — splashing through a 3-pointer as the shot clock wound down and the game clock reading 25 seconds.

“They were denying Chaz,” Vinson said. “They switched out, and there was about three seconds to go (on the shot clock) — I had no choice but to shoot it.”

The 28 points were a season-high for Williams, and one short of a career high. His 12 first-half points were a season high as well, and UMass coach Derek Kellogg spoke to the fact that Williams was locked in from tipoff.

“I thought last night he waited a little too long to really step on the gas — Brooklyn jitters and playing in the beautiful Barclays Center,” Kellogg said. “(Tonight) he was using those ball screens and just knifing them up and doing a great job.”

Williams gave his teammates credit for opening up penetration lanes with those screens and sealing off waiting big men as well.

“If I’m scoring, it’s because one of my teammates set a good pick or the sealed down low, so I always credit my teammates for anything I do,” Williams said. “We do it together no matter what.”

403 Forbidden

403 Forbidden

Another thing the team was able to do was reverse its ugly rebounding from Thursday night. UMass smoked the Owls on the glass 40-23, and held them to just 11 second-chance points.

What it gained with strong rebounding, though, UMass tried to give right back with turnovers. Nineteen Minutemen giveaways resulted in 17 Temple points.

Despite that, though, UMass ends its Atlantic 10 rivalry with Temple in the win column, and keeps itself alive in the discussion for an at-large bid to the NCAA Tournament.

As of Friday night, UMass is still likely on the outside looking in, but a win over VCU in Saturday’s semifinal would go a very long way toward changing that.

Kellogg said he is concentrated solely on VCU, and not the deliberations of the selection committee.

“I believe that we’re a very good basketball team and I leave that up to the powers that be to make that decision,” Kellogg said. “I’m really just worried about getting ready for VCU tomorrow.”

Williams, though, said he believes the UMass is an NCAA Tournament-caliber team.

“If you ask me, I believe so. This is what we’re working for,” Williams said. “We’re trying to prove to the world that we belong, and we’ll just fight until we make it.”