A year ago, Amir Coffey was on the verge of starting his senior season, not knowing exactly how dominant he would be coming off a major knee injury.

But he went on to win a state championship and was named Mr. Basketball.

Now he’s proving to be one of the Big Ten’s top freshmen.

The Hopkins product scored 17 of his career-high 30 points in the first half Friday to spark a 37-9 run in the Gophers’ 92-86 victory over St. John’s in front of an announced 8,873 at Williams Arena.

With under a minute left to play, Coffey got slapped in the face on a frustration foul. It was about all St. John’s could do to stop him. After shaking it off, he calmly sank two free throws for the Gophers, who are off to their first 4-0 start since Richard Pitino’s first season in 2013-14.

“You never know what you’re getting with freshman,” said Pitino, who was doused with water after the game. “But I knew we were getting a good one when we signed him. … I thought he was a game-changer for us.”

Coffey, the son of former Gophers and NBA player Richard Coffey, had the first 30-point game by a Gophers freshman since Kris Humphries did it twice in 2003-04. Humphries’ 36 points is a freshman school record.

Humphries left for the NBA after a year. Pro scouts will likely be watching Coffey after Friday’s breakout performance. But you wouldn’t know how well he played Friday with his unassuming postgame demeanor.

“I felt pretty good,” he said. “Before the game, coaches told me to be aggressive and stay within the offense. Half of it really started on the defensive side.”

Reggie Lynch recorded a career-high nine blocks, three short of the Gophers’ record of 12 blocks set by Mychal Thompson in 1976. The 6-foot-10 junior from Edina also had 11 rebounds in a season-high 32 minutes.

Coffey and Lynch were two new starters on a Gophers team that won eight games last season, just like St. John’s (2-1). But both teams looked to be improved this year.

Minnesota’s first appearance in the Gavitt Tipoff Games, matching up teams from the Big Ten and Big East, got off to a rough start down 22-9 midway into the first half.

But Coffey scored eight points during an 18-3 run, including four straight free throws and a steal that led to a wide-open dunk to give his team a 27-25 lead with five minutes left in the first half.

Usually reserved, Coffey pumped his fists and screamed after the slam, igniting the student section in front of him at the Barn.

“I just tried to give us a spark,” he said. “We were down. … We went on a run. First time I showed emotion this year.”

Coffey followed up his second dunk of the game a couple of minutes later with a charge on defense. He was taking over the game on both ends.

Minnesota’s lead extended to 16 points in the second half before St. John’s used a 20-7 run to cut it to 64-61 on a putback dunk from Tariq Owens.

Dupree McBrayer, a New York native, responded with a layup plus the foul for the Gophers, who wouldn’t be denied their first victory against a major conference opponent this year. Now they’ve got a confidence boost going into Tuesday’s game against Arkansas at home.

McBrayer and Nate Mason combined for 31 points and 12 assists. Jordan Murphy, who played just two minutes in the first half, finished with all 12 of his points in the second half before fouling out.

St. John’s freshmen backcourt of Marcus LoVett and Shamorie Ponds had 31 and 23 points, respectively. But Coffey made the difference when his team needed it most.

“Amir came out with the energy,” Mason said. “It’s funny because you never really see Amir show emotion. … It’s always fun to see a freshman go off like that.”