Their debut, Oh, Inverted World, probably didn’t impact much beyond the local indie scene in Albuquerque, New Mexico when Sub Pop put it out in 2001. By the time Chutes Too Narrow followed a couple of years later, the group had a following, one carved out via the usual route - relentless touring and canny promotion from their label.

This third album was something else entirely though. It was originally supposed to be called Sleeping Lessons, but frontman James Mercer ended up saving that title for the opening track instead, deciding that a tongue-in-cheek reference to The Motors - or maybe The Mavericks - would be a cleverer way of referencing his crippling insomnia. This record was the first that The Shins would release since being brought to international attention by Garden State, Zach Braff's coming-of-age directorial debut.

Even if the Scrubs man hadn’t hand-picked not one, but two of the band’s songs for his obviously personal mixtape of a soundtrack for the film, you suspect they’d have garnered that sort of notice anyway. In the mid-to-late noughties, a certain kind of emotionally-literate indie rock became catnip for music supervisors across television and cinema, so much so that teen drama The O.C. used to routinely feature the bands it borrowed tracks from, playing live in the bar that the characters frequented. Suddenly, there was a golden ticket available, offering some kind of mainstream acceptance in a way that didn’t necessarily sacrifice credibility.

The Shins rode that wave big time with Garden State; Braff famously/infamously (delete as appropriate) wrote them into the script, with Natalie Portman promising his character that their song "New Slang" would change his life. The exposure it afforded them was reflected in Wincing The Night Away’s sales figures; 100,000 copies were shifted in the first week, taking it to number two on the Billboard charts. The group toured the world in support of it, playing to the largest crowds of their career pretty much everywhere they went.

There were clear signs of transition, ones you’d expect from a band reaching some kind of personal promised land. The foibles of their old shows had fallen by the wayside a little; bassist Marty Crandall’s goofy stage banter was consigned to history on account of the group playing venues too big to facilitate that sort of audience interaction. Mercer, once so cripplingly shy that he looked like he’d rather be anywhere else than in front of a crowd, seemed emboldened, comfortable front-and-centre for the first time in his life. Signs of turbulence were scant - all was apparently well.

The Shins more or less took 2008 off. They returned to the stage in May 2009, kicking off a U.S. tour in the Washington college town of Bellingham, where observant ticket-holders were in for a shock. Dave Hernandez joined Mercer on guitar, as usual, but Crandall and long-time drummer Jesse Sandoval were conspicuous by their absence. Mercer had sacked them both. The former’s departure perhaps wasn’t that surprising - he’d been in unsavoury legal trouble around that time - but Sandoval’s firing stuck in the craw with fans, especially when, months later, he gave a sympathetic interview to a local paper in the band’s adopted hometown of Portland, Oregon, in which he explained that his lack of technical proficiency led to his being replaced.

Mercer was always the band’s chief creative force, though, and he forged onwards, making and touring two full-length albums with Danger Mouse as Broken Bells, and finding time in between to launch The Shins 2.0 with Port Of Morrow. It was an album that split opinion amongst fans and critics and was easily the slowest burner that Mercer had yet put out. A lot of the songs tended towards steadier tempos and more languid melodies. The reflective likes of "40 Mark Strasse" and "It’s Only Life" were actually amongst the finest work of Mercer’s songwriting career, but not everybody had the requisite patience.

The Shins

By now, there had been an almighty (and enduring) backlash against the creative climate that fostered the likes of Garden State, with a film once lauded for lending a voice to a lost generation of 20-somethings now being hammered for its self-indulgent navel-gazing and borderline misogyny in its portrayal of Portman’s manic pixie dream girl. Between that and the less-than-smooth lineup change, it felt like most people had made their minds up about The Shins’ new incarnation before they’d even heard the music.

10 years to the week since Wincing The Night Away was released, Mercer is in London to promote the fifth Shins LP, Heartworms. It is a very different beast to anything that’s preceded it; subtle, guitar-shy, and thematically diffuse, an album of quiet arpeggiation and sonic experimentation. It’s the first full-length that Mercer has produced in its entirety, bar one song, since he turned out Oh, Inverted World in his bedroom. You can tell a mile off that it’s the one he’s most proud of, and perhaps quite rightly; it’s a record impressive in its clarity of vision, with maddeningly catchy melodies the obvious throughline.

“I honestly hadn’t been thinking about it,” he says in a drawl that betrays jet lag, “but it’s true that Wincing The Night Away was a dividing line, both for the band and in terms of my personal life, too. I think I grew up a bit. I was the first of us to take on the responsibilities of having kids, and at the same time, I was becoming more serious about music, too. I wanted to learn more, to know more, and spend some time exploring. There was also silly, stupid relationship stuff with those guys in the band, and it came down to a choice between splitting The Shins up altogether, or just letting those guys go. I chose the latter, and I’m glad I did.”

The old lineup, according to Mercer, remain on amicable terms. “I’m still in touch with those guys, and we’re still friends. I’m much happier now and they’re doing just fine too. I’m just glad that the fans stood by me, and weren’t so pissed off that they abandoned me. In many ways, the records are made very similarly; it’s the music that’s changed, and my writing that’s grown.”

Mercer wasn’t supposed to produce Heartworms; he confesses to having lacked the necessary technical knowledge leading into it, and in an interview with this writer in 2013 to promote Broken Bells’ After The Disco, he mentioned that his live bandmate Richard Swift, an accomplished producer in his own right, was pegged to sit behind the desk. He did handle those duties on one track, "So Now What", which originally surfaced on the soundtrack for Braff’s spiritual sequel to Garden State, 2014’s Wish I Was Here, and is included on Heartworms.

“I think I just really wanted to have it understood that I would have the final say,” Mercer explains. “That’s generally how it always goes, but I did learn that Richard’s very hands-on, and I think he tends to feel ownership over the process. It was working on that song with him that made me realise I probably wasn’t going to get the experience I was hoping for if he took on the whole record, so I thought I’d just do the work myself. And it was work; I bought myself new compressors and mics and spent a lot of time reading manuals. I really had to educate myself.”

The Shins

As stylistically consistent as the early Shins records might have felt, the approach to production has actually oscillated pretty wildly; by Mercer’s own admission, the making of Oh, Inverted World involved “a little Hewlett-Packard computer that I had to go out and buy a sound card for.” Since then, he’d normally relied on a collaborator to help him through. “I started making Chutes Too Narrow that same way,” he remembers, “and as it wore on, I started to realise I was in too deep, so I got Phil Ek to come in and help me out. I was able to put my own studio together this time, just in this old carriage house in the back of my place; I actually had the time to do so, for once.”

There’s a long pause as Mercer tries to elucidate how that led to him wholly taking the wheel this time out. “Here’s the thing. The only time I sort of gave up control was on Port Of Morrow, to Greg Kurstin. It turned out great, but I missed the weird little quirky bits that I always thought were the most interesting and fun things about Shins records. I always seemed to come up with them late at night, when you’re playing the songs back and hearing them as a listener - and maybe getting high, or drinking or whatever. No matter how patient, hardworking, and considerate Greg is, I can’t really ask him to be away from his family so that he can capture me dancing around like an idiot, drinking beer. If it’s my own studio, though, nobody’s stopping me from doing that!”

Mercer’s own family have left an indelible mark on his work of late; he talked about Wincing The Night Away representing a dividing line and much of his writing since has grappled with the uncertainty of parenthood’s fledgling stages. The opening cut from Heartworms, "Name for You", is a paean to female empowerment to his wife and three daughters. “I think, on Port Of Morrow, I was really focusing a fair bit on the subjects that came up because of my family and the new responsibilities I had. Having kids made me realise how dark and scary the world is, because suddenly, you have these things that are so precious to you. I’ve become a bit more accustomed to that now, and on this album, it felt like there was a bit of a weight off my back. My kids are doing well - they’re brilliant little shiny diamonds, you know? And I guess I’m in a happier place as a result.”

That might explain why he’s also chosen to delve into his own childhood properly for the first time on Heartworms. He’s spoken in the past of having grown up as a military kid, spending time across Europe; "40 Mark Strasse" spun a tale about the sex workers who did most of their business by the German army base he lived on for a while.

He also spent time in the UK, at the Suffolk RAF bases Lakenheath and Mildenhall. The latter is immortalised in a song of the same name on the new LP. It’s a gorgeous tale of young misfit love, all mixtapes and melancholy, and the emotional honesty is disarming - pre-Port Of Morrow, Mercer dealt almost exclusively in metaphor, and yet here is is telling us a true teenage story, warts-and-all; early flirtations with girls and indie rock overlap, with Cambridge’s Corn Exchange and The Jesus and Mary Chain amongst the namechecks.

“It’s probably just that I’m getting older,” he laughs. “You get to a certain age and, for some reason, you start to imagine that there’s something interesting about your childhood. Maybe there’s not, but it’s certainly something that’s become more interesting to me. I guess I’m becoming more nostalgic, because I used to really hate the feeling of looking back - it felt like a negative. Now, I feel like I can reflect on it and not be so embarrassed for who I was. I was a goddamn kid, you know? It’s good that I’m a little easier on myself.”

The Shins

It would be Mercer’s adjustment to a new, more domestic way of life that would dictate the early stages of writing for Heartworms. “My habit would be waking up, fixing the kids breakfast, making a pot of coffee, getting them to school, and then coming home, pouring a cup, and playing the guitar. That early morning period seemed to be where I’d come up with the good ideas for basic kernels of songs. The rest of the day would be spent in the studio, trying to get some of those ideas onto the computer and just slowly, methodically piecing them together. That definitely took a while.”

If Broken Bells had proved a musical distraction, though, another diversion of an entirely different variety was around the corner. “There’s something else that happened,” Mercer recalls. “I was on vacation, and I went into this bar, and there was an old collage on the wall, where this old lady who ran the place had cut out all these pictures of her friends. I had this idea - 'oh, wouldn’t it be cool to have a facial recognition collage app on your phone?' - so I floated it to a buddy of mine, who makes apps, and we ended up teaming up and actually doing it. So now it’s a real thing, this free app called Pasted. I guess I just kept finding ways to waste my time.”

However pleased he might be with his burgeoning career as a software developer, it led to frustration on the musical front; Heartworms arrives just shy of five years after Port Of Morrow, which itself took half a decade to emerge after Wincing The Night Away. Mercer’s itchy feet were publicly evident as early as last August, when he suggested his label had delayed the album’s release in order to land a favourable slot at Coachella; given that The Shins are not on the lineup for the California bash, we might assume that he was simply being flippant about the industry’s workings.

“I had everything pretty much done by June, so I was thinking we could maybe get it out in September,” he says. “For some reason, I got really in my head about not wanting it to be five years again, but my management were insistent that we needed to set this all up properly. There was a back and forth, and they convinced me. I’d be the worst marketing person in the world, because as soon as I finish anything, I just want to upload it. Leak my own music! But the people around me talked me down from that.”

The album’s protracted gestation period, though, did at least give Mercer the opportunity to experiment substantially with the tried-and-true Shins formula. That’s something that’s clear across the record, particularly in terms of the concerted move away from the guitar. “I actually did start out writing on the acoustic, that very basic thing,” Mercer says. “That’s how I like to go about things; I’ll get a metronome and figure out a tempo, and play my part to it so that I can cut and paste. I don’t know exactly why, but I began to slowly turn down the guitar and bring up the other parts - maybe just because I find it so hard to place in the mix.”

“I think it’s helped me to develop, though; 'Cherry Hearts' is a good example. It sounded like such a stereotypical Shins song to begin with - the acoustic guitar, the drum beat, the very Shins-y melody. I didn’t want that, so I broke it apart and ended up with that weird, arpeggiated synth thing that you hear on the record. I wanted to make something that fundamentally felt very different.”

You get the impression that this sort of musical freedom is what Mercer had been yearning for when he took the agonising decision to break apart the original iteration of The Shins; there’s a boundlessness to his creativity now that he didn’t have the luxury of within the traditional parameters of a four-piece rock band. He talks with palpable excitement about the newest live lineup, which has undergone some changes since the Port Of Morrow-era; guitarist Jessica Dobson has bowed out to pursue her own project, Deep Sea Diver, whilst Swift - who Mercer confirms is “all over this record” - is also missing, presumably to focus on studio work.

Casey Foubert, once of Sufjan Stevens’ live outfit, fills in for Dobson, and Mark Watrous takes over from Swift. Drummer Jon Sortland, who played with Broken Bells, replaces the ever-wandering Joe Plummer, and Patti King fleshes out the group on keys. Yuuki Matthews, on bass, is the sole survivor from last time out. This is what Mercer always wanted - a revolving door policy. Even the conflicts seem to energise him these days.

“There’s an ongoing conversation; I want to use a click on stage so that we can play 'Cherry Hearts' properly, but Jon’s pushing back - he thinks we won’t be able to improvise if we go down that road. There’s no default setting, but what’s fucking cool is that we’ve got three string players now; Patti, Casey and Mark are all great violinists. We could have this little chamber music moment where we break everything down; start out 'New Slang' with strings, or make 'Saint Simon' sound a lot more orchestral, and play new stuff like 'The Fear' as it is on the record. It’s really exciting. It just seems like, for the first time, the possibilities are endless.”

Heartworms is out now via Aural Apothecary. The Shins play London’s Hammersmith Apollo on 29 March.