ARLINGTON, Texas -- Jameis Winston and No. 1 Florida State might have to play better for a return trip to the stadium where the next national title will be decided.

At least the reigning champion Seminoles didn't leave the $1.2 billion home of the Dallas Cowboys with a season-opening loss.

Winston threw for 370 yards and scored on a sparkling 28-yard run to smooth over some rough spots, and Florida State tied a school record with its 17th straight victory by holding off Oklahoma State 37-31 on Saturday night.

"We've got to get better," Winston said. "I told our guys ... we've got to go higher."

The sophomore quarterback wasn't nearly as efficient as he was in the college debut that jump-started his Heisman Trophy season a year ago. But he made plays when it mattered to help the Seminoles hang on after almost squandering a 17-0 lead.

The unranked and rebuilding Cowboys were 19-point underdogs but stayed close when J.W. Walsh matched Winston's scoring run with a 24-yard sprint and dive across the goal line to get within 27-24 early in the fourth quarter.

"You don't ever know what to expect with so many young players on the field," said Oklahoma State coach Mike Gundy, whose offense only has two players with at least 10 career starts. "But we never saw any fear in any of their eyes."

Winston's only passing touchdown was a 50-yarder to Rashad Greene, who had 203 yards receiving.

The scoring pass, which gave Florida State a 37-24 lead, was set up when P.J. Williams sent Walsh cart-wheeling to the turf on a hit that forced a fumble. Williams recovered the loose ball.

"We all preached it, but I do think they felt the pressure of being No. 1. I do," Florida State coach Jimbo Fisher said. "Now I think we can relax and go play football."

Walsh, who had 203 yards passing and led his team with 51 yards rushing, got the unranked and rebuilding Cowboys within six in the final 2 minutes on his second TD run, but they couldn't get the ball back.

Too Close For Comfort Florida State's 37-31 win Saturday night was the closest call in a season opener by a preseason No. 1 in over two decades. Here are the closest margins of victory by by such teams since 1990: Team Won By 2014 Florida State 6 1991 Florida State 16 1998 Ohio State 17 1997 Penn State 17 1992 Miami (FL) 17 -- ESPN Stats & Information

The Seminoles were up three in the third quarter when Winston broke loose for the longest run of his career. He hurdled offensive lineman Cameron Erving at the 10 and sidestepped a defender at the 5 before diving across the goal line as the ball was falling out of his arms.

The score was reviewed, and Oklahoma State players celebrated on the sideline when the giant video board showed the ball coming out near the goal line.

Seconds later referee Land Clark of the Pac-12 announced that the touchdown was upheld, drawing loud reactions from both sides of a crowd split pretty evenly between Florida State's dark red and Oklahoma State's bright orange.

"We just needed a play," Winston said. "Everybody contributed on that play. A 300-pound lineman, when he cuts a linebacker all the way down the field, which was amazing, I had no choice but to put the ball in the end zone."

Winston was 25 of 40 with two interceptions and several other misfires a year after throwing just two incompletions to beat Pitt in his debut. Cowboys defensive end Emmanuel Ogbah gave Winston the most trouble, getting two sacks and breaking up two passes.

"We're still a work in progress," Fisher said. "We all know that. "We have some good players but we still have to play good. It's not about being great; it's about playing great."

Speedy Oklahoma State newcomer Tyreek Hill 106 combined yards rushing and receiving. He was a perfect decoy on a 55-yard scoring pass to David Glidden, who was uncovered and ran untouched after catching the ball at the 30 to make it 20-17.

"We know he's fast," Gundy said. "We confirmed that. Because those guys who were chasing him are fast."

Hill recovered from a botched kickoff return that stranded the Cowboys at their 3-yard line and led to Nate Andrews' 9-yard interception return for the game's first touchdown.

Oklahoma State also had trouble on punts, with a bad snap leading to the drive that ended in Winston's scoring run. Another poor snap in the fourth quarter gave Florida State good field position, and Robert Aguayo's third field goal put the Seminoles up by six.