On Tuesday in Anaheim, the Colorado Rockies beat the Anaheim Angels to move into a first-place tie with the Arizona Diamondbacks in the National League West. Most franchises wouldn’t put up a banner just for leading their division at the end of August, but things are different for the Rockies: In their 25 years of existence, they have never won a division title. They’ve reached the postseason on four occasions and even advanced to the 2007 World Series, but each time was as a National League Wild Card. The Rockies enter play Friday in second place, 1 ½ games back of Arizona.

The Rockies have come this far despite entering Friday with a run differential of -14 — 139 runs worse than the third-place Dodgers. That’s a big part of why FiveThirtyEight’s playoff forecast is skeptical of Colorado’s ability to sustain success through September, giving the Rockies a 19 percent chance of winning the division.

Winning in Denver is a challenge unlike anywhere else in baseball because of the elevation. Pitching in Coors Field is often a demoralizing experience: The ball travels farther through the thinner air, and defenders are forced to play deeper and farther apart in a more spacious outfield, meaning that hits will fall more easily between them. Pitches also move differently in the mile-high atmosphere. Breaking balls break less. The mile-high atmosphere produces less spin deflection. Each time the Rockies hit the road, their hitters and pitchers must adjust to pitches moving differently. Then there is the matter of rest and recovery made more difficult in the thinner air of Denver.

The Rockies have tried seemingly everything they could think of to counteract the mountain effects: They’ve tried signing big-name free agent starting pitchers like Mike Hampton and Denny Neagle, they’ve tried to draft and develop their own pitching prospects, and they’ve tried coaching philosophies based around inducing more ground balls. Nothing seemed to work.

But these Rockies are in position to make back-to-back postseason trips for the first time in club history, and perhaps capture their first division title, because of their starting pitching. In fact, the Rockies are proving that the key to winning in Denver is not out-slugging opponents but out-pitching them.

Colorado’s starting pitching ERA of 4.34 ranked only 12th in the NL entering play Friday. But when we take into account home park and league run-scoring environments, Rockies pitchers look a lot better. The ERA-minus statistic adjusts for ballpark and run environments, with a mark of 100 representing adjusted league-average pitching and anything lower than 100 representing above-average pitching. The Rockies’ starters have posted a 93 ERA-minus to date, ranking fourth in the NL.

Their present ERA-minus ranks fourth in franchise history, trailing only the 2009 (89 ERA-minus), 2017 (91) and 2010 (92) teams. The 2009 and 2017 clubs made the playoffs. Tied for a fifth-place ranking is the 2007 club (96) that fell to the Red Sox in the 2007 World Series. The 1995 club, the first to advance to the playoffs after the franchise’s 1993 inaugural season, had the ninth-best ERA-minus (101) in club history. The Rockies’ most successful teams have been average or better on the mound when adjusting for environment.

So what’s their secret this season? It might be pitch selection. Colorado seems to have stopped throwing two-seam or otherwise sinking fastballs. Only the Rays’ and Marlins’ starters are throwing sinkers less frequently than the Rockies (5.6 percent). It’s a significant decline from last year’s 11.9 percent rate and the 20 percent or greater marks the club featured in all but one season from 2010 to 2015. Rockies starter Kyle Freeland, who has a remarkable 2.27 ERA at Coors Field this season — aided by a favorable .254 opponent average on balls in play — has dropped his sinker usage from 33.1 percent last season to 13.5 percent his season.

Like all pitches, sinkers lose spin deflection at altitude, and the sinkers thrown by Rockies starters have ranked 22nd among 30 major league clubs in pitch value since 2007, according to linear weight pitch values. Sinkers also produce the lowest swing-and-miss rates in baseball. And with more and more hitters adopting uppercut swings that do more damage to fastballs down in the zone, sinkers are less desirable than ever.

While batters have improved against the low pitch, it’s still the most difficult pitch location within the strike zone to hit for power. And despite moving away from the sinker, Rockies pitchers are still keeping the ball down. The Rockies are tied for 24th in the league in average pitch height at 2.20 feet.

These adjustments mean that the Rockies are throwing the pitch best suited for Coors Field. The most effective pitch type in the pitch-tracking era for the Rockies has been the slider. Dr. Alan Nathan found that the slider was the pitch that lost the least of its effectiveness in regard to opponent batting average and isolated slugging percentage. It’s the only pitch in the PITCHf/x era to have a positive linear weight grade for the Rockies. The Rockies are the 11th best slider team in that period on a per-pitch basis, and they also rank 11th this season in total slider value. The 2017 and ’18 seasons mark their second- and third-highest slider usage rates in club history.

The slider breaks more laterally than a curveball, and it’s less dependent on vertical drop. Curveballs lose the most movement among breaking pitches at Coors Field. And the most comparable pitch in movement profile to the slider is the cutter. The Rockies have ratcheted up cutter usage up to a league high 14 percent, and the team leads baseball in its combined percentage of sliders and cutters thrown (30.9 percent).

The Rockies are succeeding with the slider and the cutter Pitch type for the Rockies’ pitching staff by year (through Wednesday) Share of pitches by type Four-seam fastball Slider Cutter Changeup Curveball Sinker 2018 41.3% 17.6% 14.0% 10.4% 8.1% 7.8% 2017 47.3 18.0 5.5 7.3 8.4 13.6 2016 42.9 16.8 7.0 9.5 6.7 13.4 2015 36.5 13.4 9.0 11.8 6.0 17.2 2014 43.8 17.2 8.7 6.2 5.0 14.7 2013 42.6 18.8 1.9 7.0 6.1 20.0 2012 44.3 16.1 4.5 7.7 9.2 16.3 2011 45.9 17.2 2.2 6.7 7.8 16.6 2010 41.5 15.1 0.9 6.1 9.8 21.9 2009 34.9 16.3 2.1 4.8 7.5 29.3 2008 31.0 11.9 3.4 7.4 7.7 34.9 2007 31.4 9.6 3.5 14.9 10.0 29.0 Sources: Fangraphs, Pitch Info

While philosophy is important, so is talent.

The Rockies have simply had better success lately with the drafting and developing of pitchers, including Freeland, selected eighth overall in 2014, and Jon Gray, drafted third overall in 2013. Both have become top-of-the rotation staples.

With a four-seam fastball that averages 94.8 mph and a hard-breaking slider, Gray has produced three consecutive seasons of 3 WAR or better in Colorado. The 26-year-old already ranks seventh in pitching WAR in franchise history. While Gray struggled earlier this season, he’s held opponents to a .195 batting average and has a 3.38 ERA in the the second half. The success of Gray and Freeland has made up to some extent for the less effective bullpen, which Colorado invested in heavily in the offseason.

The piece holding the Rockies back is their offense. Colorado has historically struggled offensively away from home, and that’s true again this season, with an on-base plus slugging of .695. But the problems extend to home, too. The Rockies have two stars in Charlie Blackmon and Nolan Arenado, and they rank fourth in the NL in runs. But when we adjust their offense for their home ballpark, as we did with pitching, their performance falls dramatically. The Rockies have a weighted runs created plus (wRC+) of 83, which ranks 28th in the majors.

The Rockies have some glaring lineup weaknesses that they failed to address in the offseason and prior to the trade deadline. The Rockies rank 29th in first base wRC+ (67), a position that’s combined for a woeful .396 slugging percentage. After signing a five-year, $70 million deal two winters ago to play first for the Rockies, Ian Desmond has followed his disastrous -0.9 WAR season last year with -0.5 WAR to date this season. The Rockies also rank 29th in wRC+ in left field (70 wRC+) and are tied for 20th in right field (93). These corner positions were all weaknesses for them a year ago as well. Yet the Rockies’ only solution has been to sign veteran Matt Holliday to a minor-league deal a month ago; they have since called him up to help in the corners and off the bench.

The Rockies’ offense hindered them a year ago, and their offense again is the biggest threat to winning their first division title in club history — or making the playoffs at all. If the Rockies do take the division title, it will be because of their arms, not their bats.

Check out our latest MLB predictions.