Wesley Schultz was helping out a young artist in the studio when, just messing around on a break, he played Tom Petty’s “Learning to Fly.” The young artist turned to him and said, “Wow, did you write that?”

“How crazy is it that this kid, who’s life is music, doesn’t know Tom Petty,” Schultz told the Boston Herald. “But he immediately knew it was a great song because, well, it’s just a great song.”

Schultz’s band, the Lumineers, has lived by the rule of “just great songs.” The artists Schultz grew up on — Petty, Dylan, Springsteen, Fleetwood Mac — didn’t concern themselves with trends, fads, or pushing rock into new territory but writing immortal tunes. He’s followed his heroes’ examples to rarefied heights.

The Lumineers produced two massive hits (2013’s “Ho Hey” and 2016’s “Ophelia”) with over a billion streams in an age when rock bands don’t make hits. The band — Schultz and childhood friend Jeremiah Fraites — stopped scoring hits, but have still managed to gather more fans with each new album. This summer, the Lumineers will play to its biggest crowds ever including July 17 and 18 dates at Fenway Park.

“I went to see a game the last time I was in Boston and they took me back and showed me images of Paul McCartney playing there,” Schultz said. “They said, ‘Someday we’d love to have you play.’ I said, ‘So would I!’ ”

The Lumineers’ first trips through Boston had them booked into small clubs including gigs at now-shuttered venues TT the Bear’s and PA’s Lounge. Slowly the band moved up: the House of Blues, the Pavilion, a headlining gig at Boston Calling. But for years, modern roots bands, acts at the intersection of Americana and rock ‘n’ roll, didn’t get to play the really big stages. Lately, the Lumineers have been part of a roots resurgence that’s crashed arenas and stadiums.

“Noah Kahn (who played Fenway last summer) and Zach Bryan (who played Gillette last summer) are a couple examples,” Schultz said. “We’ve sung songs with them and sat in at shows with them. It’s very surreal to have them carry this music forward now… to be part of a lineage of a type of music I feel strongly about.”

That Tom Petty-to-Zach Bryan lineage can be felt all over new album “Automatic.” Schultz’ wounded, often-cracked vocals and Fraites’ plaintive acoustic piano dominate tracks. The production favors a “warts and all” approach. The sparse guitar strumming, tender melody, and that wonderful piano make “You’re All I Got” an emblematic track.

“It has these classic elements, like the sound of Jer’s piano,” Schultz said. “But, as a singer, I don’t know that I’ve sung like that on another song. It’s almost like a yodel, those high pitched notes in the hook. Being open to stuff, that’s why (the song and album) were so fun to make.”

As shocking as it is to both them and the music world, Schultz and Fraites are moving toward elder statesman territory. The Lumineers began to break out in 2011 but the duo had been working together since 2005. They are still writing songs together using the same standards they began with. But now they are trying to enjoy themselves a little more.

“We’re not gripping everything so tightly hoping it doesn’t go away,” Schultz said. “We just played our 1000th show together as a band. And I think all that leads to a better show. But also I’m reassured that people are still gravitating toward the thing that I look to music for, the song and the story are what matters, the pain in the singer’s voice.”

There’s plenty of pain on “Automatic.” But you can hear joy there too, the joy of a band doing what it loves after two decades of unlikely but well earned success.

For tickets and details, visit thelumineers.com