Updated

For Oklahoma State, a regular season filled with ups and downs ended with a heartbreaking loss at No. 16 Iowa State.

But even in defeat, the Cowboys showed why they could still be a dangerous team in postseason.

Naz Long forced overtime with a 30-foot 3-pointer at the buzzer, DeAndre Kane scored five of his 27 points in the closing seconds, and Iowa State overcame a 16-point deficit to beat Oklahoma State in overtime 85-81 on Saturday.

Long's game-tying 3 came after a rare miss from the line by Phil Forte with five seconds left in the second half. The Cowboys wanted to foul the Cyclones — any one they could get their hands on, in fact — but Long broke free for a shot at the rim.

"We wanted to foul. We were telling our guys, but they didn't either hear us or react," Oklahoma State coach Travis Ford said. "They made a tough shot. That's part of the game."

Markel Brown missed two free throws with 3 seconds left for Oklahoma State (20-11, 8-10). Marcus Smart had 27 points to lead the Cowboys, but he and Cyclones star Melvin Ejim fouled out in regulation.

Brown finished with 26 points and 12 rebounds.

But despite the brutal nature of the loss, Oklahoma State will enter the Big 12 tournament with four wins and five games since getting Smart back from a three-game suspension for pushing a fan at Texas Tech.

"We did a lot of good things, and there are a lot of things we need to get better at," Ford said.

Forte, an 89 percent free throw shooter entering play, needed to hit just one from the line with five seconds left in regulation to seal the win. But his try clanked off the rim and Long — who hit a 3 to force triple OT in a 98-97 win at Oklahoma State a month ago — buried yet another desperation bucket to give the Cyclones five more minutes.

Kane then hit a layup and a pair of free throws to put Iowa State ahead 82-79 with 11.7 seconds left. Georges Niang had 22 points for Iowa State (23-7, 11-7 Big 12), which snapped a two-game losing streak

Forte had 13 points for Oklahoma State but was an uncharacteristic 5 of 8 from the line.

"You didn't expect Forte to miss. He doesn't miss very many of them. But we said, 'Hey, if he misses we've got to get that thing up the floor quick,'" Iowa State coach Fred Hoiberg said. Long "rose up and hit a huge shot."

Early in the second half, Iowa State was behind by 16 and in serious danger of a blowout loss on Senior Day.

The Cyclones ran themselves right back into it.

Iowa State rattled off 12 straight points in three minutes behind its transition offense, as fast-break layups from Kane and Long brought the Cyclones within 45-41.

Ejim picked up his fourth foul and was forced to the bench with 9:44 left. But Iowa State still managed to retake the lead, 57-55, on a Thomas 3. Smart answered with a 3-point play and a steal and layup, and Brown's long jumper put the Cowboys back ahead 66-63 with 2:40 to go.

Long missed an open 3 from the corner with 27 seconds in regulation, a miss that appeared to be crushing for the Cyclones. Long more than made up for it, and Iowa State closed out the regular season with a win that'll surely boost their momentum heading into the Big 12 tournament.

Le'Bryan Nash had seven points with six assists on just 2 of 7 shooting.