In the fall of 2012, “Emily Owens M.D.” debuted on the CW. Its cast was attractive and appealing, but the medical soap failed to connect with audiences. “Emily Owens,” which was created by Jennie Snyder Urman (who would go on to birth “Jane the Virgin”) soon faded into oblivion.

Fast-forward to three years later, when the network has bagged a Peabody Award for one of its series — the critically acclaimed “Jane” — and is reaching ratings records for another — the superhero phenomenon “The Flash.” Under the stewardship of Mark Pedowitz, who was named president of the network in April 2011, the CW is arguably more creatively relevant and commercially competitive than it’s ever been.

Not only has it bagged multiple awards and noms, including a Golden Globe for “Jane” star Gina Rodriguez, it’s expanded its reach beyond its traditional female-skewing, 18- to 34-year-old audience. New series have turned up on critics’ top 10 lists, while older ones have gained viewers, in part thanks to Netflix exposure, which makes money for the network’s owners, CBS and Warner Bros. The CW also kick-started the superheroes-on-TV trend, an arena in which other nets have stumbled.

Since the 2011-12 season, the network has grown viewership by 27% among all viewers, and 13% in the 18-49 demographic. Accomplishing all that while going from 220 hours of original programming five years ago to more than 300 hours today — in an ever more competitive television landscape — means that speculation about the network’s viability has at long last been quieted.

“If there was any idea that the CW was going to go away, I think that’s been dispelled,” says Brad Adgate, senior vice president of research at Horizon Media.

Pedowitz says the failure of “Emily Owens” was “a light bulb” moment that triggered the turnaround. “We realized that show did not connect because no one was coming to us for a procedural,” he says. “So we took a good look at our schedule. What was really working was ‘Vampire Diaries’ and ‘Supernatural.’ ” Genre shows with a serialized element. “That’s what our audience wanted.”

But as fans of those series will attest, the genre element is irrelevant if the characters, their quests and their relationships don’t justify the audience’s investment. Loyal viewers haven’t spent more than 200 hours watching “Supernatural” because they’re curious about various methods of werewolf eradication.

“We always try to find the balance between what’s the big idea, what’s the hook that will get people to show up and watch the show, and what will keep them coming back,” says Gaye Hirsch, senior vice president of scripted development. For the CW, a show’s hook must be welded to emotionally rich relationships and ongoing conflicts that evolve every week.

“It’s not just who is Oliver fighting in Act 5, it’s ‘Why is he fighting that person? What are the emotional stakes?’ ” says Wendy Mericle, an executive producer of “Arrow,” which stars Stephen Amell as crime-fighter Oliver Queen.

“I like to write love stories and stories about family and stories about loyalty and stories about loss,” notes Julie Plec, executive producer of “The Vampire Diaries,” “The Originals” and the mid-season drama “Containment.” “And all those themes could just as easily fit into ‘Party of Five’ as they could into ‘The Vampire Diaries.’ But in this marketplace, things have to have the proverbial ‘big idea’ attached to them.”

And yet many broadcast network shows have stumbled in recent years because they gave pride of place to “noisy” concepts but didn’t match their shows’ premises or mythologies with characters and relationships worth following. The CW, on the other hand, consistently airs episodes that generally work on both a psychological and structural level. Shows that look like escapist, adventurous diversions but which convey poignance, resonance and ambiguity are harder than they seem to deliver.

No network or show is perfect, of course, but CW shows are usually smart, self-aware and even snarky at times; Rogelio alone on “Jane the Virgin” has generated endless GIFs and memes. But the CW’s shows also exhibit a depth of sincerity that can be refreshing in a television landscape that all too often relies on shock tactics, bland characters and hollow formulas.

At the moment, the CW’s scripted fare builds capably on the tradition of many of the WB shows that preceded it: The programs take the characters’ emotionally dilemmas and moral challenges seriously, but the shows don’t necessarily take themselves seriously. “Ponderous” is the last word you’d use to describe them.

Things looked less rosy in 2011 and 2012, when “Smallville,” “One Tree Hill” and “”Gossip Girl” were wrapping up their runs. As much as executives would have enjoyed using a magical amulet borrowed from the “Supernatural” set to speed the process of redefining the network, the revival process was gradual — bits and pieces at a time, Pedowitz recounts.

“One of the great challenges I faced was there was a core audience there — a really strong female audience,” he says. “As you try to grow your network and slowly shift your brand, you have to keep sight of the fact that you don’t want to lose them.”

The shift began with “Arrow,” which combined action, heroic feats and the kind of smart relationship drama that Greg Berlanti, who developed the show with fellow exec producers Marc Guggenheim and Andrew Kreisberg, had displayed on the WB’s well-regarded “Everwood.”

Moving “Supernatural” alongside “Arrow” gave the net a Wednesday presence, with “Vampire Diaries” having established itself on Thursdays, Pedowitz says. “The next year, we had (‘The Vampire Diaries’ spinoff) ‘The Originals,’ ‘Reign’ and ‘The 100,’ and those shows started expanding our universe,” he notes. “Last year, we had ‘Flash’ and ‘Jane.’ ‘The Messengers’ didn’t work, but we had ‘iZombie.’ ”

Of course, not everything paid off. Despite its ties to the “Sex and the City” franchise, 2013’s “The Carrie Diaries” didn’t connect with viewers, and along with “The Messengers,” sci-fi serials like “The Tomorrow People” and “Star-Crossed” also failed to catch on. Moreover, despite the CW’s gains, NBC, ABC and CBS and Univision all finished ahead of it in the 18-49 demo in the 2014-15 season.

Still, it was clear the network had momentum. Expanding the audience demographics had been a major goal, and viewership in the 18-34 and 18-49 demographics improved on three nights, and total viewership went up on four nights. “The Flash” finished its first year as the most-watched show in the CW’s history — and among men over 18, set a record as the highest-rated CW series ever.

“These shows have great economic value within a much larger ecosystem beyond the CW — there’s international sales, out-of-season streaming rights, syndication rights,” Pedowitz explains. But before those revenue streams kick in, he adds, “You have to create shows that people want to see and talk about.”

“The Flash” was one of those shows, and it didn’t work just because it was a comic-book show; those kinds of programs have proliferated in recent years, and not all of them have consistently worked. “The Flash” took off because it was a well-made, well cast show with a specific vision that its creators stuck to with great tenacity. And “The Flash” and “Arrow” are by no means always light and aspirational.

“We’re allowed to go dark, surprisingly, on a network and on a show that can have a younger demographic,” Mericle says. “There are families who watch ‘Arrow.’ and we’re allowed to explore those issues without being prohibited. It’s testimony to the universe’s ability sustain that, and also to the network’s support.”

That’s not to say the CW doesn’t face hurdles. It depends on horror, the supernatural and zombies for its bread and butter, but those kinds of programs aren’t hard to find anymore, not in a world where “Game of Thrones” wins the best drama Emmy. And though the CW’s audience is now much more equally distributed between men and women, many of those potential viewers have grown up streaming an array of genre TV content that grows larger every year. Doing what they’ve seen before all but guarantees they’ll tune out.

“Our audience watches so much TV and they’re so sophisticated,” says Traci Blackwell, senior vice president of current programming. “They’ve seen every twist and turn.” Pedowitz and his execs work closely with their showrunners to emphasize that even the wildest scenarios must contain problems viewers can relate to. Jane Villanueva may have gotten pregnant via a ridiculous medical mishap, but for the most part, she is firmly tethered to reality via her supportive family.

“It’s a surreal tone, and yet the relationships feel very authentic,” Hirsch says of “Jane” (which was joined by “Crazy Ex-Girlfriend” Oct. 12). “It’s the balance between a tone that’s a little bit heightened, and recognizable relationships between a mother, a grandmother and a daughter that feel familiar to people.”

Though executives would probably rather tout the network’s ratings growth, the CW’s bigger accomplishment might be what its creative teams have created visually on budgets that would make HBO showrunners weep. “The 100,” “Arrow” and “The Flash” and other CW programs frequently display exceptional shot composition and handle action showdowns and emotional confrontations with deft assurance. Urman spends hours every week in the editing room, making sure “Jane’s” on-screen graphics, lively narration and fantastical scenarios mesh well.

“When you’re flipping through the channels, [‘Jane the Virgin’] feels like a different kind of place,” says Joanna Klein, senior vice president of scripted development. “When we are developing new shows, we always ask each other, ‘Does this feel like a world? Is this a whole, all-encompassing place to transport our viewers to, with a unique flavor and a strong voice?”

When trying to bring together all those elements and keep a 22-episode season moving forward, the last thing a producer wants is half a dozen different executives weighing in with conflicting notes, but several CW showrunners say dealing with the network is typically a streamlined process.

“It’s a small but passionate company where everyone communicates with one another,” notes Urman. “That sounds like a small thing — but it’s not. It means, as a writer, you know your target. You know everyone’s spoken, everyone’s on the same page.”

During the development process, Klein encouraged Urman to give Jane and her baby’s father, Rafael, a rich history, which Urman says unlocked deeper layers of the “Jane the Virgin” story. Urman recalls that Pedowitz and the development team also urged her to lean into the pilot’s comedy and magic realism — that note led her to add a scene in which a bus poster of telenovela star Rogelio comes to life and talks to Jane. “That’s a scene that is so seminal to the pilot, and it would not have existed had they not pushed me for more,” Urman says.

“iZombie,” which returned for its second season Oct. 6, may be the most clear expression of the laser focus that CW has brought to its development process. The show is based on a comic book, the zombie element gives the show a genre spin, and the fact that its main character, Liv Moore (Rose McIver) works in a morgue even gives the network a way to come at the forensic-procedural format.

But “iZombie” is not about the dead bodies Liv examines, nor are executive producers Rob Thomas and Diane Ruggiero-Wright overly obsessed with why the undead popped up in Seattle. The zombie-plague mystery does progress each week, but ultimately the show is about Liv’s halting attempts to build a new life after her old one was destroyed by her infection. Her sardonic running commentary reveals how much of a struggle it has been to make sense of her new reality, but each step along the way has, strangely enough, given Liv a new perspective on what it means to be alive.

“There’s a little wish fulfillment in it,” Hirsch says of “iZombie.” “How do you make the best out of being a zombie? How do you have a positive impact of the world?”

Whether a show is a superhero property or has some other kind of high concept at its core, “I think fundamentally, our audience cares about the characters,” Blackwell says.

And though the network’s current success might be built on recognizable formats — superhero shows, soap operas and supernatural dramas — this roster of CW shows doesn’t traffic in timid tweaks to those formulas. Pedowitz “very much encourages the producers to push the limits,” says VP of current programming Liz Wise. “I think that’s part of what’s different about the CW — we’re not necessarily trying to do safe TV anymore.”

Pedowitz’s attention to detail has a direct influence on the final product. Says Wise: “He watches everything. He will walk in saying, ‘Did you see this obscure (BBC America) show? I love the soundtrack.’ He sees things he loves and what people are responding to on cable, and he’ll say, ‘Why can’t we do that on network television?’ ”

Berlanti, who helms the superhero trilogy “The Flash,” “Arrow” and the upcoming spinoff “DC’s Legends of Tomorrow,” praises his boss’s eye for talent. “His instincts in casting are so helpful, because he watches all the same genre shows we do,” Berlanti says. “He’s helped us go after talent from ‘Doctor Who,’ ‘Spartacus,’ and ‘Prison Break’ — we have very similar taste in that regard.” The two men even called each other the same day with the same idea: to develop a new show around the guest stars on “The Flash” and “Arrow.”

“He also recognized times have changed and the audience can appreciate a shared universe, so last season, he agreed we should try to work in the crossovers between ‘The Flash’ and ‘Arrow’ sooner rather than later,” Berlanti notes.

Pedowitz travels to the set of every CW show every year, but even before those visits began, he did his homework. Around the time that Pedowitz came to the CW, two years after he ended a stint as the president of ABC Studios, he had a conversation with Plec and her fellow executive producer, Kevin Williamson, about their flagship show. “He started quoting parts of ‘The Vampire Diaries’ to us, and we realized that he had made an effort not just to be caught up to where we were at that time, but he’d gone back and watched the entire series from the beginning,” says Plec.” “He really goes out of his way to connect himself to the material, and he gives notes as a fan would.”

Sophomore series “The 100,” from exec producer Jason Rothenberg, features a disparate pack of survivors trying to stay alive on Earth a century after a nuclear apocalypse. The bold choices made by the drama, which premiered in early 2014, have garnered comparisons to “Battlestar Galactica.”

“Jason and I had a long discussion early on, and I said, ‘If you make what is perceived to be the CW version of this, you will not succeed,’ ” Pedowitz says. “Jason took that to heart, and he made a darker, grittier, much more morally ambiguous show.” Rothenberg recalls getting a call from Pedowitz after the exec watched a cut of a particularly dark episode, telling him he could go even darker. “I remember laughing: ‘Even darker than killing 300 innocent people?’ That one essentially set the bar.”

A Season 2 episode involving multiple deaths produced “quite a lot of hemming and hawing” from Standards and Practices, Rothenberg recalls, but “Mark again was on our side. He really wants us to push the envelope. In Season 3, I’m making it my mission to find the line that we can’t cross.”

“As creators and writers, we feel we have the kind of creative support and latitude that most people associate with some of the major cable brands,” notes Aline Brosh McKenna, executive producer of “Crazy Ex-Girlfriend.”

“The 100” and “Jane the Virgin” are among the CW shows notable for the diversity of their casts, but that’s an effort Pedowitz has championed behind the scenes as well. Last summer, the Television Critics Assn. hosted a groundbreaking panel: Eight female showrunners from the CW talked about making their shows, and about the challenges presented by working in an overwhelmingly male industry.

“We’re up here doing all sorts of different kinds of shows, and I think that’s definitely kudos to the CW for that — for not kind of pigeonholing women into, ‘Oh, you can only run this kind of show,’” Gabrielle Stanton, an executive producer of “The Flash,” said during the panel.

Of course, one of the most notable things about the panel was that most networks wouldn’t be able to assemble a group of eight female showrunners.

In the executive suite, Thom Sherman, the network’s executive vice president of development, has two women, Hirsch and Klein, reporting to him (as well as Justin Rosenblatt, senior vice president of alternative series). The team reporting to Michael Roberts, executive vice president of current programming, consists of Blackwell, who is African-American, and Wise.

“I’ve been a big believer that you need to reflect society. It makes for better TV shows,” Pedowitz says. “Beyond the fact that it’s the right thing to do, it’s also good business.”

“I like that the men at that network are just as capable of being emotionally open to the material,” Plec notes. “Part of their success is, they have that magnificent balance of very strong women who have really earned their positions and very strong men who don’t have to posture, you know, with the masculinity.”

Will audiences still be be open to the CW’s offerings this season and beyond? As Adgate noted, “the tastes of young adults can change rapidly.” And the network is trying to branch out beyond its genre base: It has projects based on Clive Barker’s “Weaveworld” and the Archie comics in development, but the network is also developing “The Drop,” a show about DJs in Miami, and a TV version of the Nicholas Sparks romance “The Notebook.”

But if Team Flash could defeat Gorilla Grodd last season, anything is possible.