Andy Samberg, Akiva Schaffer and Jorma Taconne were childhood friends in Berkeley, Calif., who went off to separate colleges before reuniting and forming The Lonely Island. Their short film collaborations led them to Saturday Night Live, feature films, sitcoms and two hit albums of their comedy hip-hop songs — “Incredibad” and “Turtleneck & Chain.”

Their third album, “The Wack Album,” is due out June 11, 2013.

As the trio explained to Ron Bennington on Friday for SiriusXM’s “Unmasked,” perhaps their biggest break came a year before they landed on SNL and struck YouTube gold with “Lazy Sunday.”

In 2004, another childhood friend of the group, Murray Miller, was working on the MTV Movie Awards — hosted by then-17-year-old Lindsay Lohan — got the trio hired onto the writing staff. They joked that they had to share the $1,000 writer’s gig among the three of them, and after commissions and taxes, probably only took home a couple of hundred dollars each. They didn’t have a memorable joke or sketch to share from that year.

But it kept them in the writers room the following summer, when Jimmy Fallon hosted the 2005 MTV Movie Awards. For that telecast, Samberg, Schaffer and Taccone wrote two pre-taped bits for Fallon, including the opening spoof on Batman Begins with Andy Dick and Jon Heder.

That brought them to the attention not only of Fallon, but also SNL producers Mike Shoemaker and Steve Higgins, and then to the attention of Lorne Michaels.

“We had just done a pilot for FOX called Awesometown that didn’t get picked up,” Samberg recalled.

Added Taccone: “Calling it a pilot is technically incorrect.”

Pilot presentation, then? Here that is, from May 2005 — the month before the MTV Movie Awards with Fallon.

“I had also just done Premium Blend” for Comedy Central, Samberg explained, “so we had a little bit of heat.”

As hot as the weather in Chad?

And here is another joke from Samberg’s “Premium Blend” performance in 2005 about his “gay dad.”

Getting Jimmy Fallon’s attention during the MTV Movie Awards, however, meant also being front and center then in the minds of SNL producers Mike Shoemaker and Steve Higgins. And that brought them in to see Lorne Michaels. Samberg auditioned a couple of time for Michaels, he said, before he and then his friends all received job offers — Samberg as a cast member, Schaffer and Taccone as writers.

“The word on us was that we were better as a team,” Samberg said. “That word was correct.”

It did take a few days for that message to be received, however. “We did have this weird week where we weren’t sure what was going to happen,” Schaffer said.

The Lonely Island recently met “Weird” Al Yankovic for a photo shoot for GQ magazine, and joked that working at SNL meant getting to meet their comedy and pop-culture heroes — or rather, “they were forced to meet us.” They achieved success rather quickly in their rookie season, thanks to their already fully-formed habits as short filmmakers. They’d make 100 “SNL Digital Shorts” over seven seasons. Their first big hit was their third effort, “Lazy Sunday” (fun fact: their first three videos all featured the actual apartment building where Samberg and Schaffer were living that fall of 2005). They learned of the power of YouTube that very Sunday.

But they’re quick to add that they were just in the right place at the right time. “If YouTube had been around six years earlier, it would have been ‘(More) Cowbell,'” Samberg said. Schaffer said even the old “Mr. Bill” shorts from the original SNL cast had a similar sensibility and would have gone viral had that been a thing then.

Their “SNL Digital Shorts,” however, soon brought the stars to them. Within a month of “Lazy Sunday,” they said Natalie Portman hosted and sought them out to shoot a rap video with her, spitting out a Lil’ Kim rhyme to make her case. “We said yes, and we wrote a song for her,” Samberg said.

The following Christmas, they wrote, produced and filmed “Dick in a Box” with Justin Timberlake, and from there, a franchise and the basis for two and soon-to-be three hit records full of comedy rap, hip-hop and pop.

Not that they’re not still connected with their old comedy friends. One of Taccone’s other projects is a rascally role on HBO’s Girls, which counts Murray Miller as a writer and co-executive producer. And Samberg did land a sitcom on FOX eventually — this fall, he’ll be starring in the new series, Brooklyn Nine-Nine.

You can catch up with The Lonely Island’s videos here. New ones pop up on “Wack Wednesdays.”

And you can pre-order “The Wack Album” now.