LINCOLN, Neb. (AP) Even as badly as Nebraska is playing right now, a win over the Cornhuskers at Memorial Stadium is always cause for celebration.

That was especially true for Purdue, which beat the Huskers 42-28 on Saturday for its second straight win after an 0-3 start.

''It's big, it's big for our program,'' said quarterback David Blough, who threw for 328 yards and accounted for two touchdowns. ''Nebraska, no matter what, at home is a tough team to beat, whatever their record is. We knew we had to come, do the little things right, take care of the football. We had some penalties go our way.''

Some?

The Huskers, in losing their program-record eighth straight game, amassed 582 total yards and 30 first downs but couldn't overcome five personal fouls and a total of 11 penalties for 136 yards. The Huskers (0-4, 0-2 Big Ten) also set a program record with their seventh straight home loss on a chilly and misty afternoon.

''In three of our games, we've played well enough to win a game,'' Nebraska first-year coach Scott Frost said. ''In my opinion, we looked like one of the most undisciplined teams in the country, and it kills me.''

Nebraska has the second-longest losing streak in the Football Bowl Subdivision. UTEP took a 16-game losing streak into its game at UTSA.

The Huskers' most recent win was Oct. 28, 2017, against the Boilermakers. Their most recent home win was Sept. 23, 2017, against Rutgers.

Markell Jones gave Purdue (2-3, 1-1) a 42-21 lead with a 6-yard run early in the fourth quarter.

''I think it's a huge win for us,'' Purdue coach Jeff Brohm said. ''I don't care what Nebraska's record is, coming into the venue against this team that's on the ropes a bit. Every team in our conference is going to be a challenge.''

Devine Ozigbo rushed for a career-high 170 yards for the Huskers, and he scored from 23 yards out to make it a 14-point game with 13:04 left. But Adrian Martinez was intercepted and the Huskers turned the ball over on downs on their last three possessions.

Martinez, a true freshman starting his second straight game, threw for 323 yards and ran for 91 in his best performance.

''We don't accept losing - coach Frost doesn't and the players don't,'' Martinez said. ''It's not something I'm used to, he's not used to it and we're not going to put up with it. He's given his heart out to us and we have to respond and play. I feel like we let him down a little bit. We need to come back firing this next week.''

D.J. Knox led Purdue with 87 yards rushing and two touchdowns, Rondale Moore caught eight passes for 85 yards and Brycen Hopkins had five receptions for 103.

''We knew this would be a tough football game,'' Brohm said. ''We knew the team would be hungry for a win and the fans would come out like they always do. We had to block that out. Our guys just played well. When Nebraska made some runs we could have easily shut that down. We are happy to come out with the victory.''

THE TAKEAWAY:

Purdue: The Boilermakers, coming off a win over then-ranked Boston College, were able to win their first road game thanks to Nebraska's undisciplined play. Blough completed 25 of 42 passes and ran seven times for 38 yards, and Moore made a number of dazzling plays.

Nebraska: The Huskers had the better offensive numbers, but penalties continue to kill them. Their 582 yards were the most in a loss since they amassed 610 against Colorado in 2007.

EFFICIENT OFFENSE

Purdue scored on all six of its red-zone opportunities and did not turn over the ball for the first time this season. The Boilermakers finished with 516 total yards.

KNOCK OFF THE DANCING

Before kickoffs, a group of Nebraska players danced to music playing over the public-address speakers - and Frost didn't like it.

''When we were down 13 points and we had backups and reserves dancing on our sideline before kickoffs, they look like they love losing and they look undisciplined,'' Frost said.

UP NEXT:

Purdue visits Illinois on Oct. 13.

Nebraska visits No. 15 Wisconsin on Saturday.

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.