The task looked daunting. Three offensive plays into Saturday night’s game, and the Gophers had lost their workhorse running back, senior Rodney Smith, to a left leg injury. And they were facing Fresno State, a team that had lit up the scoreboard to the tune of 79 points a week earlier.

Smith’s loss was massive, of course, but that didn’t derail the Gophers. Instead, they cobbled things together, got two huge plays late and gutted out a 21-14 victory over Fresno State in front of an announced crowd of 38,280 at TCF Bank Stadium.

“I’ve been proud of a lot of football teams in my career as a head coach, and I can only think of one other time I was this proud of a group,’’ an emotional Gophers coach P.J. Fleck said. “This was a very special win for us tonight.’’

And two very special plays in the fourth quarter made it happen.

First, with the Gophers (2-0) trailing and facing third-and-9 from their 44-yard line, true freshman quarterback Zack Annexstad was flushed from the pocket under heavy pressure. He reversed course, ran toward the left sideline and fired the ball to his go-to receiver. Tyler Johnson leaped high, snared the ball and planted a foot down just inbounds for a 13-yard gain to the Bulldogs 43.

“For him to make that incredible play, that’s just what he does,’’ Fleck said of Annexstad, who went 16-for-26 for 175 yards.

Five plays later, wide receiver Seth Green gave the Gophers a 19-14 lead on a 3-yard run, his second touchdown of the night — and fourth of the season — out of the wildcat formation. Green then got to throw his first pass, a connection with tight end Ko Kieft for the two-point conversion and 21-14 lead with 3:28 left.

“I was excited, obviously,’’ Green said. “The O-line held up for me, Ko made an awesome catch and he sold it.’’

The second very special play came from the defense, which shut out Fresno State (1-1) in the first half and didn’t allow the Bulldogs to score their first TD until 20 seconds remained in the third quarter.

On its final possession, Fresno State drove to Gophers 4-yard line as quarterback Marcus McMaryion completed five of six passes, including a 6-yard fourth-and-3 play from the Minnesota 10 with 1:24 left.

On the next play, the Bulldogs called a trick play, with running back Josh Hokit sweeping right and lobbing a pass toward tight end Jared Rice. Gophers safety Antoine Winfield Jr. — Remember him from that 76-yard punt return in the opener? — initially looked to be beaten on the play, but he recovered quickly, caught up to Rice and intercepted the ball, getting a foot down to secure the victory.

“Out of the corner of my eye, I saw the tight end release,’’ Winfield said. “That’s my man, and I have to make this play.’’

Said Fleck: “That just shows what kind of player Antoine Winfield is.’’

The Gophers did all of this after losing Smith for the game. Fleck said Smith, who returned to the sideline in the second half in a warm-up suit, suffered a lower extremity injury — “knee, ankle, we’re not sure.’’ The coach still was awaiting test results.

Smith was replaced by true freshman Bryce Williams, who rushed 25 times for 87 yards, including four consecutive times for 25 yards on the winning drive. Last week’s backup, redshirt freshman Mohamed Ibrahim, dressed but didn’t play because of a leg injury.

The Gophers got contributions from several others, including kicker Emmit Carpenter (field goals of 53 and 50 yards), true freshman receiver Rashod Bateman (five catches, 78 yards), true freshman cornerback Terell Smith (eight tackles, seven solos, one interception, one pass breakup) and senior linebacker Blake Cashman (team-high 10 tackles).

“It was pretty emotional in that [locker] room,’’ Fleck said. “… Those kids laid it all on the line tonight. They left nothing out there.’’