When it came to live-action television series, Marvel for the past few years was only in the ABC and Netflix business. But that changed in February, when the company teamed with FX for the new drama, Legion.

Created by Fargo’s Noah Hawley, the trippy, visually breathtaking drama is based on a character from Marvel’s X-Men comics, and follows David Haller (Downton Abbey’s Dan Stevens), who was told all his life he’s mentally ill but realizes he actually has mutant, psychic powers.

Legion has been an early hit, ranking second among all scripted cable series in the 18-49 demo (in live-plus-3) during its first four weeks, behind only The Walking Dead. On Wednesday, FX ordered a second season of the show, which will air in 2018.

In a statement announcing the renewal, Jeph Loeb, a Legion executive producer and the head of Marvel Television, noted, “We’re particularly proud of our partners at FX and the success we share on our first TV series together.”

So how did those two distinct and seemingly contrasting brands team up to create a new hit show?

“It’s been remarkably easy,” said John Landgraf, the CEO of FX Networks and FX Productions. “Part of it is because I just really like Jeph Loeb and the people that work with him, and he seems to like to me. I really respect him creatively and I think he’s a fan of FX and its brand.”

Together, said Landgraf, “we’ve been partnered in supporting Noah. … His ambitions are so great that he’s always going to take you to places that are initially scary or confusing before they gel, but we and Marvel seemed resolutely committed to Noah and exactly the show that Noah wanted to make from the beginning.”

The show Hawley envisioned was one that blended elements from both companies, as he explained to Adweek in February. “That appealed to me, this idea that the struggle over morality is never fixed. It’s constant. And characters that are good under the right circumstances can do bad things. That felt like the FX show,” Hawley said. “Then on the Marvel side, there is a sense that the readers of these comics—and I saw it at Comic-Con—a huge part of the fan base feels like they don’t fit in. These stories are metaphorical for them, about defining themselves instead of being defined by society. So it felt like the perfect kind of balance.”

To help Hawley maintain that balance, FX and Marvel made a key decision when it came to working with Hawley and giving him feedback—they are going to be partners, not rival suitors. “We were always going to give notes together,” Landgraf said. “FX wasn’t going to talk to Noah and then Marvel was going to talk to him; that means we were going to talk to each other.”

And both sides lived up to the agreement during production of Legion’s first season. “Marvel and Jeph have made contributions that are different than ours, and we’ve probably made some contributions that are different than theirs,” Landgraf said. “But that’s around the margins. Eighty percent we’ve agreed, and we’ve never had a substantial creative disagreement. Our point of view was always, ‘Look, if we do have a disagreement, we’re just going to have to debate, and the best idea is going to win.’ But we’ve never even had a debate. We just really agreed. So it’s been great, honestly.”

Marvel’s next TV collaboration will also be with the Fox Networks Group. The company is shooting a Fox pilot in contention for next season. Tentatively titled Gifted, it’s also set in the X-Men world of mutants and was written by Burn Notice creator Matt Nix.