Colorado State coach Jim McElwain left his old stomping grounds with a loss, and likely a measure of respect for his team from two-time defending national champion Alabama.

The Rams (1-3) contained the top-ranked Crimson Tide’s running game and were nursing hopes of a huge upset before allowing two fourth-quarter touchdowns in a 31-6 loss Saturday night.

“We challenged our guys to come in here and go toe-to-toe,” said McElwain, who was offensive coordinator for Tide national championship teams in 2009 and 2011. “I think the guys on the other sideline have earned some respect for Colorado State Rams and how hard we played the game.”

The Crimson Tide (3-0) led just 17-6 after Colorado State managed two third-quarter field goals.

“We were ready to go in the fourth quarter, our emotions were through the roof,” Rams quarterback Garrett Grayson said. “By that time we realized we were playing with the No. 1 team in the country and we realized that we can play with them. I don’t think the score at the end of the game shows how close it really was, because I felt like it was a lot closer.”

Grayson completed 24 of 38 passes for 228 yards for the Rams, who managed just 51 yards on the ground. Rashard Higgins had seven catches for 71 yards and Joe Hansley gained 82 on six receptions.

The Tide outgained Colorado State 338-279 in total yards after running up 568 yards a week ago.

McElwain’s Rams didn’t reach Alabama territory until midway through the third quarter and then did it two straight drives.

The Tide defense did come up with stops both times. Jared Roberts kicked field goals of 45 and 31 yards to cut the Tide’s lead to 17-6.

Landon Collins pulled Grayson down on a keeper on third down to force the second kick.