Playing in the National Invitation Tournament for the third time in four years, Stanford will play UC Davis in the first round at Maples Pavilion on Tuesday at 8 p.m.

The Aggies (25-6) received an automatic bid to the NIT as the Big West Conference’s regular season champion with a 14-2 mark. They lost to Hawaii 65-58 in the semifinals of the conference tournament.

“We’re excited to still be playing,’’ Stanford coach Johnny Dawkins said. “A lot of teams aren’t. We still have the opportunity to play for a championship. Our young kids have an opportunity to grow as they get some postseason experience.’’

Corey Hawkins, the son of former NBA player Hersey Hawkins, led UCD in scoring with 20.4 points per game. He leads the nation in three-point shooting accuracy at 49.0 percent (77 for 157).

He’s also Dawkins’ godson. “I know him very well, and he is a terrific shooter,’’ Dawkins said.

Under former NBA player Jim Les, the Aggies won 11 of 12 games before the loss to Hawaii.

If Stanford wins, it would host the winner of the Rhode Island-Iona game. If the Cardinal survive, there’s a chance they could host St. Mary’s in the third round.

The Cardinal (19-13) are coming off an 80-56 loss to No. 17 Utah in the Pac-12 Tournament quarterfinals in Las Vegas. It was their eighth loss in the last 12 games.

Freshman forward Michael Humphrey is likely to miss his fifth straight game as a result of a sprained ankle. Rosco Allen will start in his place.

Stanford is playing in the NIT for the eighth time. It won it in 1991 and again in 2012.

The first three rounds of the 32-team tournament are played on campus sites. The semifinals March 31 and the final April 2 are at New York’s Madison Square Garden.

The only other Pac-12 team in the NIT is Arizona State, which visits UConn, last year’s national champion, in the first round.