Stanford to play North Carolina in Sun Bowl

Recommended Video:

Stanford had a better overall record than Washington State and a better overall and conference record than Utah but was picked after those schools in Sunday’s bowl-game selections.

The Cardinal (9-3, 6-3 Pac-12), No. 18 in the final College Football Playoff rankings, will play North Carolina (8-4) in the Sun Bowl in El Paso, Texas, on Dec. 30. The Sun is ranked fifth among bowls with Pac-12 affiliations.

The Cougars (8-4, 7-2) routed Stanford 42-16 in October but were not ranked in the CFP’s final 25. They will play Minnesota in the more attractive Holiday Bowl in San Diego on Dec. 27.

Utah (8-4, 5-4) will play Indiana in the Foster Farms Bowl at Levi’s Stadium on Dec. 28. The local bowl could have taken Stanford.

Head coach David Shaw said he didn’t mind going to El Paso. “In the middle of the season, I made it a point not to care what anybody did outside the building,” he said. “All we wanted was an opportunity to play in a bowl game. We’re not in business to worry about where we are.”

Foster Farms Bowl executive director Jamie Brandt said in a statement, “We were fortunate to have two great Pac-12 options to choose from in Stanford and Utah, but ultimately, it came down to the fact that Utah had been a contender for the College Football Playoff for much of the season and hasn’t played in our bowl since 2005. Stanford played in the 2014 game and played at Levi’s Stadium in 2015 (in the Pac-12 title game). Showcasing new teams for our Bay Area fan base is always a priority in our selection.”

The Sun Bowl pays each participating team $2.15 million. The Holiday pays $2.83 million and the Foster Farms $2.21 million.

DURHAM, NC - NOVEMBER 10: Mitch Trubisky #10 of the North Carolina Tar Heels thows a pass against the Duke Blue Devils during their game at Wallace Wade Stadium on November 10, 2016 in Durham, North Carolina. (Photo by Streeter Lecka/Getty Images) less DURHAM, NC - NOVEMBER 10: Mitch Trubisky #10 of the North Carolina Tar Heels thows a pass against the Duke Blue Devils during their game at Wallace Wade Stadium on November 10, 2016 in Durham, North Carolina. ... more Photo: Streeter Lecka, Getty Images Photo: Streeter Lecka, Getty Images Image 1 of / 1 Caption Close Stanford to play North Carolina in Sun Bowl 1 / 1 Back to Gallery

Stanford will play in a postseason game for a school-record eighth consecutive year, but the Sun Bowl represents a comedown for the Cardinal after three Rose Bowls in the past four years.

The Cardinal have played in the Sun Bowl three times, most recently in 2009 when they lost 31-27 to Oklahoma.

North Carolina (8-4, 5-3 ACC) tied for second in the ACC’s Coastal Division. The Tar Heels’ most notable wins were over Florida State, Miami and Pittsburgh.

First-year starting quarterback Mitch Trubisky threw for 3,468 yards and 28 touchdowns during the regular season, both UNC single-season records. He finished the regular season second in the ACC in passing behind Clemson’s Deshaun Watson.

Wide receiver Ryan Switzer caught a school-record 91 passes for 1,027 yards and five touchdowns. He tied the NCAA record with five punt-return touchdowns in 2013, had two more in 2015 and is one shy of the career mark of eight held by Texas Tech’s Wes Welker and Oklahoma’s Antonio Perkins.

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald

Sun Bowl

Stanford (9-3) vs. North Carolina (8-4)

Where: El Paso, Texas

When: 11 a.m. Dec. 30

TV/Radio: Channel: 5 Channel: 13 Channel: 46/1050