Ross Chastain and Tyler Reddick advanced to their first NASCAR All-Star race by winning the first two stages of the 22-car open qualifying race at Texas on a hot, slick track Sunday.

Chastain, who had to go to the back of the field after a violation discovered in the prerace inspection of then No. 42 that led to his crew chief being ejected, passed Reddick on a restart with two laps remaining in the first stage. Reddick led all 20 laps of the second segment to move on to Sunday night's main race.

A day earlier, Chastain finished third in the Truck Series race at Texas before his truck was disqualified after a postrace inspection violation.

There were 17 drivers already qualified for the All-Star race Sunday night, when the winner will get $1 million. Three other spots were being determined by a three-segment, 50-lap open race, with one other driver added by fan vote.

The outside temperature was in the upper 90s, with the heat index close to 110 degrees Fahrenheit, and much hotter inside the cars for the NASCAR All-Star Open qualifying race under the late-afternoon sun. The track temperature in the in the mid-140s, by far the highest this season.

The starting order for the All-Star race was determined by random draw, the polesitter is Kyle Larson, who has won the last two Cup races and has been part of three consecutive 1-2 finishes for Hendrick Motorsports with defending Cup champion and All-Star winner Chase Elliott, who starts sixth.

Chastain became the first driver added to the All-Star race after a caution-filled 20-lap opening section. A final 10-lap shootout followed after Reddick's qualification.

There will be six segments for the All-Star race to the $1 million for the winning driver — the first four being 15 green-flag laps each, before a 30-lap segment that must include a four-tire stop for which the fastest pit crew will get $100,000, and then 10 laps to the checkered flag. Based on a random draw, the top eight to 12 spots will be inverted before the second and fourth segments, and the entire field of up to 21 cars will be inverted before the third.

The lineup for the longest stretch will be based on cumulative finishes from the first four segments, and the finishing order of that fifth segment will set the starting order for the final short shootout.

While the rules package for the cars will be similar to the usual configuration and downforce for 1 1/2-mile tracks, slightly reduced tapered spacers will lower the horsepower to the range of 500-510, short of the normal 550.

Texas is the third different track in three years for the non-points All-Star race. Chase Elliott won last summer at Bristol, where it was moved from Charlotte, which hosted 34 of the first 35 All-Star races, because of COVID-19 restrictions in North Carolina.

The All-Star race at Texas serves as a sendoff for old-school NASCAR promotor Eddie Gossage, the Texas Motor Speedway president working his last day for Speedway Motorsports.

It is a full-circle finish for the 62-year-old Gossage, who had been considering stepping down for at least two years. He was chosen by Speedway Motorsports founder Bruton Smith to oversee the 1,500-acre complex since its groundbreaking in 1995, two years before the first Cup race at the track that included a big crash in the first turn of the first lap.

Gossage was a young public relations director at Charlotte Motor Speedway in 1992 when, during a news conference to promote NASCAR’s first nighttime All-Star race, one of his stunts literally set Smith’s hair on fire. When Smith threw the giant light switch rigged by Gossage to highlight the Charlotte speedway’s new lighting system, sparks flew.

After the final laps Sunday night, three decades after he thought he was headed for the unemployed line, Gossage is going out on his on — and planning to spend Monday at the pool with his three grandchildren.

More AP auto racing: https://apnews.com/hub/auto-racing and https://twitter.com/AP_Sports