John Krasinski needs to stay ripped — so he’s borrowing Dwayne Johnson’s gym.

He’ll soon be heading to Colombia to begin filming the second season of Amazon’s action-drama series “Jack Ryan,” in which he plays the title character, but for the last three weeks, Krasinski has been ensconced in Atlanta with his wife, Emily Blunt, and their children while she shoots Disney feature “Jungle Cruise” alongside Johnson.

As previously incarnated in films starring Alec Baldwin, Harrison Ford and (in case you forgot) Chris Pine, Ryan is an athletic role — one that requires things like punching bad guys and jumping out of helicopters onto Russian submarines. To help Krasinski stay in super-spy shape, Johnson offered him use of his private workout space.

The problem is, Johnson’s gym is outdoors under a massive tent. And this is Atlanta. In July.

“He likes to sweat it out,” Krasinski says. “But sometimes I look around and wonder if he’s punking me, and he’s working out somewhere where there’s air conditioning.”

Until recently, Krasinski was not a likely candidate to sweat it out with the Rock. His career was made by the beloved NBC sitcom “The Office,” on which he played America’s Work Husband Jim Halpert, whose smirking looks into the camera became the stuff of memes. But Krasinski is in the middle of a resurgence, one that began with an unexpected turn in Michael Bay’s “13 Hours,” then kicked into high gear with the surprise success of “A Quiet Place,” the modestly budgeted horror film that he wrote, directed and starred in with Blunt. When it premiered in April, the movie blew past box office expectations and impressed critics.

“Obviously this year has been a game change, and obviously I’m looking forward to doing more,” he says.

For Krasinski, “Jack Ryan” — which premieres Aug. 31 — is a chance to cement his rebirth as a relatable action star who makes thoughtful, entertaining passion projects in his free time. For Amazon and studio Paramount Television, the companies behind the series, it arrives as both navigate critical transitions.

Krasinski had not been eyeing a return to television. When “Jack Ryan” showrunners Carlton Cuse and Graham Roland first inquired about the actor, they were shot down — informed by his agent that he wasn’t considering TV jobs. Undeterred, Cuse and Roland sent their scripts outlining the first four of the initial season’s eight episodes to Krasinski.

“We took a shot, and he instantly responded,” Cuse says. “It was very exciting. He was the first guy we went to.” Roland adds, “Jack Ryan’s superpower is his doggedness, his determination and, more than anything, his brain. I think that John has that. He’s a very intelligent guy, obviously. That comes across in his performance. And he also is a leading man. He’s got that relatability, that kind of Tom Hanks factor. He can play that classic hero that you can really see yourself in.”

Krasinski was 10 years old when “The Hunt for Red October” premiered in 1989. Like any red-blooded American male his age, he admired Clancy’s signature character — a CIA agent armed with little but his own ingenuity, willing to confront any problem, set on doing what’s right.

“I don’t know if I wanted to be Jack Ryan just to be Jack Ryan, though I probably would have been,” Krasinski says. “It was really the pitch of a long-form television version. Maybe movies weren’t the best medium for Jack Ryan, really, with the books being so long and rich and detailed with tradecraft that with long-form television you could really investigate the character in a real way, similar to the books.”

After striking out at the box office with Pine-starrer “Jack Ryan: Shadow Recruit” in 2014, Paramount was intent on resuscitating the franchise that spawned hits such as “The Hunt for Red October” and “Patriot Games” for the ever-expanding television market. “Jack Ryan” is a sort-of prequel, introducing the character just four years into his espionage career. Other iterations have hit the ground running, pistol in hand. Krasinski’s Ryan is a former Marine working a mid-level desk job as a CIA analyst. He has yet to make any mark at the agency. He rides a bicycle to work.

But after uncovering a potential terrorist mastermind’s movements through the tracking of some very dull monetary transactions, Ryan finds himself on the ground in Yemen, coming out on the losing end of an encounter with a man he likens to Osama bin Laden. He is soon on the front line of a worldwide manhunt.

“In the first season, I really liked the idea that I think Jack tries to get out of it like four or five times,” Krasinski says. “He’s like, ‘It’s OK, you guys can go do the important stuff. I’m just here to give you info.’ That was really what did it for me.”

It was his work in “13 Hours” — Bay’s attempt to turn the politicized 2012 attack on the U.S. diplomatic compound in Benghazi, Libya, into an apolitical story of real-life military heroism — that convinced the powers that be that Krasinski could deliver in the role so tied to Ford and Baldwin. In “13 Hours,” Krasinski played a buff and bearded former Navy SEAL, part of the security team that fought to defend the ill-fated Benghazi compound from armed assault.

Krasinski “has an ability to be both compelling and relatable, and has all the necessary dramatic tools to create a nuanced character,” Paramount Pictures CEO and chairman Jim Gianopulis notes to Variety. “John’s really someone who audiences root for, and his unique versatility offered the perfect recipe for tackling the iconic role of Jack Ryan.”

Cliff Watts for Variety

When “13 Hours” came out, Paramount was only three years into relaunching its TV-production business, which had been dormant since corporate parent Viacom’s split with CBS a decade earlier. The company had already decided, however, to move the Jack Ryan franchise into TV development in the wake of “Shadow Recruit.”

The effort to develop a TV iteration of Clancy’s best-loved character was led by Amy Powell, who came from the studio’s film side to launch Paramount TV as president in 2013. In an industry shocker, Powell was fired last week for making what Gianopulos described in a memo to staff as comments “inconsistent with our company’s values.” Sources tell Variety that Powell made generalizations about black women being angry during a call related to the studio’s upcoming series adaptation of “The First Wives Club,” offending several people. Powell denies that she said anything insensitive.

Gianopulos declines to discuss Powell’s firing but affirms his support for “Jack Ryan.” Though new leadership has not been set, the Paramount TV division is not expected to change course but instead continue a strategy reliant on talent — Krasinski is under an overall TV deal with the studio through his Sunday Night Prods. — and developing projects from the company’s vast film library.

“Jack Ryan” arrives when many other seeds taken from the Paramount vault are beginning to bear TV fruit. Upcoming for the studio this year and next are Cary Fukunaga’s “Maniac,” starring Emma Stone and Jonah Hill, for Netflix; and “Catch-22” for Hulu, with George Clooney starring and serving as executive producer. The studio projects it’ll have 11 series on TV in 2019, with the size of its production slate and operating income both doubled.

Talent like Clooney, Stone, Hill and Fukunaga do not make things cheap. Paramount has been aggressive in establishing itself as a “premium” TV brand, and “Jack Ryan,” which it produces with Skydance Television, is part of that push. The first season cost $8 million per episode to produce.

“When I was doing ‘Lost,’ that was the biggest, most complicated television production in the world at the time,” says Cuse, who was co-showrunner with Damon Lindelof on the groundbreaking ABC drama. “I think that ‘Jack Ryan’ is superseded by ‘Game of Thrones’ and maybe ‘Westworld.’ Not much else. It’s really at the top of the pyramid in terms of what’s being done in television.”

In the relaunch of the “Jack Ryan” franchise, John Hoogenakker, Wendell Pierce and Krasinski play CIA operatives working out of the Middle East.

Jan thijs

Cuse, who’d read eight of the Jack Ryan novels simply as a fan, was brought in by Powell, who trusted him to provide the scale and vision necessary. He came paired with Roland, who had worked with him on the final season of “Lost” and the short-lived A&E drama “The Returned,” and was a veteran of the Iraq War. “Graham was in the Marines, so he innately understood the world that Clancy wrote,” says Cuse.

Adds Roland, “The thing that I brought from my own experience having been in the Middle East is that the vast majority of the people I came into contact with were really good, hardworking people and not that dissimilar from people here in the States. And I think that really informed a lot of how we approached the Middle East storylines.”

After landing the gig, Cuse and Roland went to work on an initial take for the series that would have adapted Clancy’s “Clear and Present Danger,” the 1989 novel set amid the U.S. war on drugs. After a month, they scrapped it. “We came up against the problem that the book had been written 35 years ago, and the world had just changed so much,” Roland says.

The two then made a decision that is perhaps the biggest risk of their attempt at a Jack Ryan relaunch — to step back from Clancy’s novels and reimagine the character in original stories inspired by, but not beholden to, the urtext.

“One of Clancy’s staples that he did so well was write geopolitical thrillers that were of the moment,” Roland says. “And we realized that we had to take the thing that people loved about the character and about the franchise but find our own geopolitical thriller that felt relevant today. So that’s why we decided to craft our own stories.”

When Cuse and Roland pitted their Jack Ryan against a Middle Eastern terrorist leader, they knew they had to take steps to ensure that their Muslim characters were portrayed authentically. They employed cultural experts and hired a female Muslim writer. They also modified the character of CIA muckety-muck Jim Greer — played in three films by James Earl Jones and in the series by Wendell Pierce — making him a Muslim.

“We wanted the story to have a bad guy, not a bad culture,” Cuse says. “We wanted to make sure that we had a spectrum of characters with different perspectives.”

Cliff Watts for Variety

Amazon Studios, with its emphasis on global appeal, may seem an odd home for a big-budget story about an American action hero taking down rocket-launcher-armed Muslims. But the streaming service snatched up the project as soon as it came to market.

“Jack Ryan” was given a straight-to-series order by Amazon two years ago, when Roy Price headed the e-commerce giant’s entertainment division. Price was fired in October amid sexual harassment allegations. In February, Jennifer Salke, the veteran NBC and 20th Century Fox Television executive, was brought aboard Amazon Studios to right what was widely perceived as a foundering ship.

Salke has since moved quickly, signing the likes of Jordan Peele and Nicole Kidman to big-ticket first-look deals, and refilling the production pipeline with an eye toward appealing to multiple demographics. One of her first orders of business was to reach out to Cuse and Krasinski, texting and emailing them almost immediately after watching early cuts of the first few episodes.

“When you come into these positions, all the projects that are in the works, people are wondering, ‘Where are you going to fall on this?’” says Salke.

“I was just so into it that I wanted to make sure they knew right away. I wanted to make sure they both knew how supportive I was and how excited I was to have inherited something that seemed so promising to me.”

“We realized that we had to take the thing that people loved about the character and about the franchise but find our own geopolitical thriller that felt relevant today.”

Graham Roland, ‘jack ryan’ co-showrunner

She backed up her words with action: In April, Amazon gave “Jack Ryan” an early Season 2 renewal.

Salke has experience with espionage shows, having helped develop “Homeland” at Fox. At Amazon, she has been forthcoming about the need to launch more series capable of drawing female viewers. She sees “Jack Ryan,” despite the macho exterior, as fitting that bill.

“I have a pretty good barometer for what the broad-stream female audience is looking for, so that gave me a lot of confidence,” she says. “I’m a gut decision-maker, but here we’re able to get such great research on things and comprehensive looks at the audience through different sorts of mechanisms than I had at the network. So I’m able to get a good picture, and I think the female audience will be really compelled to watch this. But there’s action, intrigue and the DNA of the Jack Ryan franchise that will attract a passionate male audience as well.”

The other big selling point was Krasinski. Salke grew to know the actor during her tenure as president of NBC Entertainment during the final seasons of “The Office.”

“To come in and have John in something, I was just so excited about it,” Salke says. “He elevates the role. It’s an unexpected Jack Ryan. He brings so many qualities to the role that you wouldn’t see in your average action hero. I love that he feels like an Everyman. He has a boy-next-door quality. But then you’re surprised to see the intensity that can come out of him.”

Despite the heat now surrounding Krasinski as a director, he hasn’t set his next gig behind the camera. And “Jack Ryan” is a significant commitment. Season 1 began shooting in February and didn’t wrap until July. (Season 2 is also slated to film for five months.) In December, Krasinski was pulled into reshoots, during which he tripped on a railroad track and broke his kneecap in four places. He then went off to edit “A Quiet Place.” “Thank God I was editing a movie, because I didn’t have to do anything,” he says. “I was just sitting there with my leg up.”

Such injuries come with the action-hero territory, which Krasinski claims he never really sought. He recalls finding out eight years ago on Blunt’s birthday that Marvel had passed on him for “Captain America.”

Cliff Watts for Variety

“My agent called and said, ‘They’re going to go with Chris Evans,’” he says. “And I remember I said, ‘Yeah, look at him. He’s Captain America.’” His wife offered to cancel their evening plans, but he demurred. “I said, ‘It’s Chris Evans. Of course we’re going to dinner.’”

But Krasinski always wanted to make a military story. He comes from a military family and counts 11 relatives who served or are serving. Military communities embraced “13 Hours” for its straightforward heroics. Krasinski believes that “Jack Ryan” will resonate similarly.

“It feels to me that the CIA has been really supportive of our show because they want someone from the CIA to be celebrated as heroic rather than portrayed as an antihero,” he says. “That’s real and admirable.”

According to the star, Cuse and Roland have mapped the show’s long-term arc over half a decade. “The five seasons would be similar to the phases of the books, so that by Season 5, Jack would be president of the United States.” But Cuse is noncommittal on the subject. “We think the show can go for a long time, but we’re not getting too far ahead of ourselves,” he says.

If “Jack Ryan” pays off as hoped, a good chunk of Krasinski’s future will be spent making the world a safer place on-screen. And he’s comfortable doing it on a TV show.

“My whole career has been in the renaissance of television, where it’s been heading to this digital medium,” he says. “So I never saw it as my big return to television. I just looked at it as this cool gig, and also an extension of what I’d been doing on ‘13 Hours.’”

That extends to the physical transformation he had to undergo from desk jockey to man of action.

“I just felt like a moron if I worked that hard to look like that,” he says, “and then gave it up.”