WEST LAFAYETTE, Ind. (AP) Adrian Martinez got the job done with both his arm and his feet Saturday.

Martinez, who was benched as starter earlier in the season, started and ran for two touchdowns and passed for another to help Nebraska to a 37-27 victory over Purdue.

Martinez completed 23 of 30 passes for 242 yards and rushed for another 45 yards.

''It's always nice to win especially on the road,'' Martinez said. ''I think this team proving we are capable of winning in a style like that is huge for us. This is something we can continue to build on.''

Nebraska coach Scott Frost said the plan was to play Luke McCaffrey at quarterback, too, but the offense had momentum with Martinez at the controls.

McCaffrey did come in briefly in the second half when Frost said Martinez was ''nicked up.'' McCaffrey completed his only pass for 11 yards.

Both teams are 2-4 in the Big Ten-only schedule.

Cornhuskers receiver Wan'Dale Robinson caught nine passes for 114 yards.

''He's one of our best playmakers, if not the best, so we put an emphasis on getting him touches,'' Martinez said.

Nebraska took a 34-13 lead on Martinez's 1-yard touchdown run early in the second half. Purdue bounced back to narrow the deficit to 34-27 with two Jack Plummer touchdown passes.

However, Nebraska regained control with an eight play, 79-yard drive capped by Connor Culp's 32-yard field goal, his third, with 7:04 to play.

''That was one of the weirdest drives I've ever seen coaching or watching,'' Frost said.

The Cornhuskers were helped and hurt by penalties on the more than 5-minute drive.

Plummer connected with Payne Durham for a 20-yard touchdown with 1:29 left in third quarter and hooked up with David Bell for an 89-yard score with 12:16 remaining in the fourth quarter. Two Nebraska defenders ran into each other leaving Bell wide open.

''The defense played well except for giving up that play,'' Frost said.

Purdue finished with minus 2 rushing yards.

Plummer completed 33 of 47 passes for 334 yards. Bell had 10 caches for 132 yards while Rondale Moore caught 13 passes for 78 yards.

''Coach always says don't worry about the scoreboard, just play hard,'' Plummer said. ''We're playing hard no matter what the score is. But does it stink to be down 14 at the start? Yeah, it does. But I think we showed some life there in the second, third quarter.''

Nebraska jumped out to a 14-0 lead in the first 5 minutes on Purdue's special teams miscues. On fourth down from its own 40, Purdue punter Brendan Cropsey's punt was blocked by Levi Falck and recovered by Simon Otte on the 1-yard line. Dedrick Mills scored on a 1-yard run.

THE TAKEAWAY

Nebraska: The Cornhuskers got back in the victory column with a solid game by Martinez and taking advantage of Purdue's mistakes. Adrian Martinez will likely hold on the starting position with his solid game.

Purdue: After a 2-0 start, the Boilermakers have lost four consecutive games, including the last two at home. Purdue got in a 14-0 hole in the opening minutes and never recovered. The Boilermakers never were able to get the run game going. Top rusher Zander Horvath was limited to 21 yards on seven carries.

PREGAME INJURY

Nebraska safety Myles Farmer was carted off the field during warmup with an air cast on his right leg. Nebraska coach Scott Frost said it was non-contact ankle injury. Cornhuskers defensive back Nadab Joseph was later carted off the field with a leg injury during a kickoff return.

FLAG FEST

Both teams showed a lack of discipline. Purdue was penalized 11 times for 126 yards while Nebraska had nine penalties for 107 yards. ''It's playing hard,'' Purdue linebacker Derrick Barnes said of the penalties. ''It's football, it happens sometimes. It's just competing. We can eliminate some of the dumb penalties. But we're going to compete and play hard to the whistle.''

UP NEXT

Nebraska: The Cornhuskers will host Minnesota on Saturday.

Purdue: The Boilermakers will play at Indiana on Saturday.

---

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25

Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.