IOWA CITY, Iowa (AP) — For about 37 minutes, Iowa and Minnesota played a weird game that leaned slightly toward the Gophers.

Then Devyn Marble took over, providing an emphatic finish to a game that wasn’t clear until the final seconds.

Senior Matt Gatens scored 18 points, Marble added 12 and Iowa rallied to beat Minnesota 63-59 on Wednesday night and snap a three-game losing streak.

Marble keyed Iowa’s 9-0 run to close the game, following a 3-pointer with an emphatic one-handed dunk to tie the game at 59 with 1:43 left. Bryce Cartwright gave the Hawkeyes (12-11, 4-6 Big Ten) the lead with a pair of free throws, and Gatens hit an easy layup off a Marble feed with eight seconds left to seal the victory.

“He’s a playmaker. He’s becoming somebody that really understands what that situation was and how to be successful,” Iowa coach Fran McCaffery said.

Minnesota (16-7, 4-6) lost despite shooting 10 of 19 from 3-point range. Ralph Sampson III had 13 to lead the Gophers, who lost for just the second time in six games.

“They made some clutch plays down the stretch and we didn’t. We had some breakdowns defensively in the last few minutes that really cost us dearly,” Minnesota coach Tubby Smith said.

This was the epitome of a back-and-forth affair, as both teams built and blew double-digit leads in less than one half.

Minnesota kicked off the wackiness with about as bad of a start as it could imagine. The Gophers fell behind by as much as 15-3 midway through in the first half — only to turn that deficit into a 10-point lead midway through the final half.

Iowa missed 12 of its first 15 shots to start the second half, and Minnesota took advantage by slowly but surely building its lead to 45-35 when Andre Hollins buried a step-back jumper from 15 feet.

The Hawkeyes answered with a quick 9-0 run before a 3-pointer from Julian Welch put the Gophers ahead 48-44 with 8:41 left. Iowa took its first lead of the second half when Melsahn Basabe, who came off the bench after starting nearly all season, hit a pair of free throws to make it 51-50 Iowa. But Welch answered with another 3, and Austin Hollins drained a long 3-pointer that put the Gophers back on top 56-53 with 4:03 left.

“We didn’t panic when we got down 10,” McCaffery said. “We made the plays we had to make down the stretch.”

Welch had 12 points, six assists and five turnovers and Austin Hollins added 11 points for Minnesota, which was outscored in the paint 30-10 and shut out in the final 3:24.

“He played hard. Turnovers just once again — five turnovers, you can’t afford to have those type of turnovers,” Smith said of Welch.

The Hawkeyes and Gophers had taken markedly different paths since Iowa upset Minnesota 64-62 in Minneapolis on Jan. 4.

The Gophers lost once more at home, to Purdue, to drop to 0-4 in the Big Ten. But they won four of their next five, including a 77-74 victory at Indiana, to resurrect what had been fading hopes for an NCAA tournament bid.

The Hawkeyes came home from that win over the Gophers and got blasted by Ohio State 76-47, which kicked off a stretch of four losses in five games. The bottom fell out in a 103-89 loss last weekend to Indiana, which shot 55 percent from the floor and grabbed a staggering 20 offensive rebounds.

Iowa answered for the 103 it gave up to the Hoosiers by allowing just 3 to the Gophers in the first nine minutes. But Minnesota snapped out of its funk in a hurry, reeling off a 16-5 run to pull within 20-19 late in the first half.

The Gophers, aided by a suddenly generous Iowa defense and an equally sputtering offense, took a 27-24 lead at halftime.

It wouldn’t last, as Iowa rallied in the final three minutes to keep its head above .500.

“I knew we needed somebody to make plays, so that’s what I tried to come out and do and I think I did a pretty good job,” Marble said.

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)