STILLWATER, Okla. -- James Anderson scored 16 points and Oklahoma State ended a six-game losing streak -- its longest in more than two decades -- by beating Colorado 64-63 on Wednesday night.
Oklahoma State (11-11, 2-6 Big 12) won for the 21st time in its last 22 home games against Colorado (9-13, 1-7) in a matchup of teams that entered Wednesday tied for last place in the conference.
Until this season, the Cowboys hadn't lost six straight games since the 1986-87 season.
The Buffaloes lost their sixth straight game despite 22 points from Richard Roby, who set a school record with his 106th career start, breaking a mark set by Donnie Boyce from 1991 to 1995.
Colorado rallied from a 9-point halftime deficit to tie the game at 36-36 on two free throws by Roby with 10:13 left. But Terrel Harris started a 9-0 Oklahoma State run with two free throws with 9:06 left. He capped the spurt with a dunk that followed a steal and pass by Byron Eaton and put the Cowboys up 45-36 with 6:05 left.
Eaton's steal gave him 170 for his career, tying him for Oklahoma State's career lead in that category with Ivan McFarlin, who played for the Cowboys from 2001 to 2005.
Cory Higgins pulled Colorado within 49-46 with a 3-pointer from the corner with 2:56 left. Marcus Dove and Eaton each hit a pair of free throws for Oklahoma State to make it 53-46.
Colorado chipped away at its deficit after that but came no closer than one point when Marcus Hall launched a half-court heave at the buzzer. Just before that, Eaton had made two free throws with 1.2 seconds left.
Despite the dramatic finish, the mistakes came early and often for both teams. Colorado's Dwight Thorne threw up an off-balance 3-point attempt with the shot clock running down to end the game's initial possession, and Oklahoma State answered with a turnover.
Then came a Colorado turnover and another Oklahoma State turnover before Thorne scored the game's first basket, more than two minutes after the tipoff.
The errors sometimes were odd in nature, as when Oklahoma State's Nick Sidorakis was called for traveling -- while trying to inbound the basketball.
But Martavius Adams provided a bright spot for Oklahoma State. He broke his career high for rebounds by grabbing nine in the first half and scored three baskets -- all off putbacks -- as the Cowboys took a 25-16 halftime lead. Adams had only hit one basket in the Cowboys' seven previous Big 12 games.
Colorado went 5 of 20 from the field in the first half and made just 4 of 10 free throws. The Buffaloes didn't hit double figures in the scoring column until 15 minutes into the game.
If Roby hadn't of made a buzzer-beating 3-pointer at the end of the half, Colorado would have allowed Oklahoma State to set a new school record for fewest points allowed in a half against a Big 12 team. The Cowboys held Baylor to 14 first-half points on Feb. 14, 2004.
Hall scored 12 points, raising his career total to 1,008. He is the 25th player in school history to score 1,000 points or more in his career.