IOWA CITY, Iowa -- Iowa got a measure of revenge Thursday.

Tyler Cook hit a go-ahead free throw with 1:36 to play, Peter Jok scored a game-high 29 points, and Iowa pulled out an 83-78 win over No. 17 Purdue at Carver-Hawkeye Arena.

There was an immense amount of satisfaction from Iowa in salvaging a season split with Purdue just two weeks after the Boilermakers ran the Hawkeyes out of Mackey Arena by 22 points.

"I told (my teammates) if they weren't ready for revenge today, they might as well stay in the locker room, and I think they were ready from the get-go," Jok said. "Last game, we didn't get a great start and after that, we couldn't come back from it."

Cook made one of two foul shots to put the Hawkeyes (11-7, 3-2 Big Ten) on top 79-78.

Purdue (14-4, 3-2) called its final timeout with 28.6 seconds left, possessing the ball with a chance to win, but forward Caleb Swanigan missed a driving layup. The ball was rebounded by Iowa's Cordell Pemsl, and Swanigan fouled him with 13.8 seconds remaining.

Swanigan said he should have attempted a dunk instead of driving in for the lay-up.

"They executed down the stretch better than us," Swanigan said. "It's something we already knew. We just got to show more of a level of maturity."

Pemsl missed the front end of a one-and-one, but the ball went off the Boilermakers out of bounds. Iowa guard Jordan Bohannon was then fouled and made both of his free throws.

Purdue had a chance to tie it at the end, but Dakota Mathias' 3-point attempt grazed the side of the rim and was rebounded by the Hawkeyes. Nicholas Baer sealed the win with a pair of free throws for Iowa.

"I thought we executed," Purdue head coach Matt Painter said. "We just didn't finish, and then we didn't get enough stops on the other end."

Jok, the Big Ten's leading scorer, shot 11 of 19 from the floor and added eight assists and six rebounds. The Hawkeyes also received a 16-point, six-rebound effort from Cook, who shot 7 of 10 from the floor.

Swanigan led the way for Purdue with 17 points and eight rebounds. The Boilermakers got 13 points apiece from Vince Edwards and Isaac Haas. Reserve Ryan Cline added 12 points, making 4 of 8 shots, with all of his attempts coming from behind the arc.

The Boilermakers led 47-38 at halftime before Iowa opened the second half with a quick 5-0 run. Baer, who started the second half in place of Isaiah Moss, made a layup, and that was then followed by a 3-pointer from Jok.

"We knew it was imperative for us to come out and have a good start to the second half," Baer said. "Pete was Pete all game, just knocking down shots, making tough shots, making plays for others. I'm just really happy with our team effort tonight."

The Hawkeyes would take their first lead of the half when Bohannon drained the first of two consecutive 3-pointers to put Iowa ahead 54-52 with 14:36 remaining. As a team, the Hawkeyes shot 67 percent in the second half.

"(Purdue) makes you play this way to win," Iowa head coach Fran McCaffery said. "That's what makes it a good feeling for me, because I just want those guys to experience what that's like.

"That's what you work for. That's what you prepare for, to be in a game like that and band together and do what's necessary to win."

Purdue went back ahead and led 71-66 with 8:33 to go. Cook scored eight of the Hawkeyes' final 17 points of the contest.

Iowa travels to Northwestern on Sunday, while Purdue returns home to play Illinois on Tuesday.

NOTES: Purdue F Caleb Swanigan entered Thursday's contest having assembled double-doubles in eight straight games, including all four of the Boilermakers' previous Big Ten games. Swanigan recently garnered his fourth Big Ten Player of the Week honor this season. ... Iowa F Tyler Cook started Thursday's contest, marking his fourth straight start since returning from surgery on his right index finger. Cook came off the bench in the Hawkeyes' previous matchup with Purdue in the first game he played in more than a month. ... Scouts from the Brooklyn Nets, Charlotte Hornets, Houston Rockets, Indiana Pacers and Memphis Grizzlies were in attendance.