FARGO, N.D. – Miles Bergner hit a 33-yard field goal as time ran out and the Coyotes shocked second-ranked North Dakota State 24-21 Saturday.

Bergner had made just four of his previous 11 field goal attempts this season. But he split the upright as South Dakota snapped a 14-game Missouri Valley Football Conference losing streak and NDSU's 26-game home winning streak.

"We got beat by a better football team," North Dakota State coach Chris Klieman said. "We've got to go back to work. We've got to find a way to regroup on Monday. Give South Dakota credit."

It was USD's first win over NDSU in Fargo since 1978.

"It took us a while to get going," USD coach Joe Glenn said. "The first quarter was a little rough. Ryan Saeger did a great job commanding the game and our defense caught fire and handled the run."

The Coyotes outrushed the Bison 193-125 and outgained them 395-320 in total yards.

NDSU managed just 91 total yards in the second half.

NDSU (4-2, 2-1 MVFC) took the opening kickoff and marched 67 yards to take a 7-0 lead with 9:58 left in the first quarter. Bruce Anderson capped the drive with a 2-yard run for his first touchdown of the season.

The Bison extended their lead to 14-0 on Darrius Shepherd's 37-yard TD catch with 2:30 left in the first quarter.

South Dakota (3-3, 1-2) sliced the lead in half when Ryan Saeger lobbed an 8-yard TD pass to Brandt Van Roekel with 10:38 left in the half. The Coyotes' drive covered 86 yards and included 41 rushing yards by Saeger.

With 6:01 to play in the half, Saeger scored on a 1-yard run to tie the game 14-14. The run came one play after Saeger completed a 73-yard pass to Trevor Bouma down to the Bison 1.

Bouma, a junior who had missed the Coyotes' previous two games against the Bison with injuries, had 94 yards rushing and 80 yards receiving.

NDSU quarterback Carson Wentz was 16-for-28 for 195 yards and two touchdowns. His mastery of the clock paid off right before halftime when he drove the Bison 72 yards in 11 plays for the go-ahead score. He threw a 7-yard TD pass to Andrew Bonnet with 42 seconds left.

NDSU outgained the Coyotes 229-197 in the first half. USD's success came via big plays.

"We've got to play better on both sides of the ball," Klieman said at half. "We have to stay in our gaps and be conscious of the big play. "

Glenn said the Coyotes' big second quarter was more about what they did as opposed to what NDSU did not do.

"They didn't give us anything. We earned everything we got," Glenn said.

South Dakota had the only scoring opportunity in the third quarter, but Bergner missed a 47-yard field goal attempt. Bergner had made just four of 11 field goal attempts this season.

The Coyotes tied it at 21-21 on an 8-yard TD pass from Saeger to Drew Potter and the Bergner PAT with 4:47 to play. USD drove 72 yards in 15 plays for the score.

Saeger completed 12 of 20 passes for 202 yards. He also ran 16 times for 92 yards.

After USD tied the game, NDSU took over at its own 20 and went three and out.

USD took over with 3:20 to play and the ball on its own 29. Saeger moved the Bison up the field, helped by a 15-yard personal foul on Nate Tanquay after a sack on third down.

Six plays later, Bergner came out to end it.

Zach Vraa became NDSU's all-time leader in receiving yards with a 13-yard catch in the third quarter. He finished the game with 35 yards on three catches and a career total of 2,738, passing Kole Heckendorf's 2,732.

King Frazier led NDSU in rushing with 39 yards on nine attempts.

Bruce Anderson had nine carries for 34 yards.

"We all left a lot on the field, so we just have to pick it up and prepare harder," Anderson said.