Richmond resumes its starring role as filmmakers’ favorite substitute for Washington, D.C., in the seventh season of Showtime’s “Homeland” (9 p.m. Sunday), which has been in town shooting episodes since September.

Recognizable Richmond landmarks guest starring in Sunday’s premiere include the North Side’s Veritas School campus (as the Washington Navy Yard), a Ginter Park house (as the home of Carrie Mathison’s sister) and The Jefferson Hotel (as a Washington hotel). In addition, Hopewell appears as the Buckminster, Pa., business district.

“Homeland” showrunner Alex Gansa said the decision of where to film each season of the thriller is dictated by the story, which is set in motion by the emotional state of Carrie Mathison (Claire Danes) paired with what producers glean on their annual field trip to Washington, D.C., for meetings with members of the real-life intelligence community.

“Donald Trump got elected president, and I don’t believe if Hillary (Clinton) had been elected, we would be telling the story in D.C. this season,” Gansa said. “But because season six ended with Carrie fearing for our democracy, it felt like we had to continue that story, and it is certainly a fear that’s on a lot of people’s minds right now.”

The “Homeland” story picks up with unemployed former CIA operative Carrie living in the Washington, D.C., home of her sister, Maggie (Amy Hargreaves), after an attempted military coup against the administration of U.S. President Elizabeth Keane (Elizabeth Marvel). That attempt to overthrow the government led the president to arrest 200 members of the U.S. intelligence community, including Saul Berenson (Mandy Patinkin), without bringing charges against them. Carrie, no longer working for the Keane administration, is eager to help get the 200 released.

“Carrie is really struggling with her bipolar illness this season,” Gansa said. “The second main theme of the season is when America is divided she becomes an easy target for foreign powers to interfere in our democracy. Those two things are thematically connected by the fact that Carrie’s bipolar, and, in a sense, so is the country.”

“Homeland” was nominally set in D.C. in its first few seasons when it filmed in Charlotte, N.C., but Gansa said producers never gave serious consideration to returning there.

“That was mostly where Carrie lived. ... We were playing that for Alexandria, a lot of the suburb locations. We were in D.C. a little, but not much,” he said. “Now we’re telling a White House story, and it just felt better to be in a city that could double for D.C. better than Charlotte can.”

And it turns out filming in Richmond is easier than in Washington.

“Shooting in D.C. is impossible,” said Sunday Stevens, one of two first assistant directors on “Homeland.” “There are so many different jurisdictions. You go there to shoot second unit, never an entire project.”

In addition to Charlotte, previous seasons of “Homeland” were filmed in Cape Town, South Africa; Berlin; and New York. (The current season will also film some scenes for episodes 11 and 12 in Budapest, Hungary, after wrapping production in Richmond in early March.)

“Every year has been a new adventure for us on ‘Homeland,’” Stevens said. “Filmmaking is not rocket science; however, it is different every time you try it. No show is the same. No episode is the same. You don’t want it to be the same. You’re trying to create something new.”

Stevens said the challenge of shooting in Richmond is that it’s not a production center with immediate access to specialized filmmaking equipment that can be found in New York, Los Angeles or Atlanta.

“There are very talented crew members here,” she said, noting that the logistical challenge of making a TV series in a nonproduction center is the ability to quickly gather everything that’s needed episode-to-episode. “When you start to film a movie, you have done three to four months of prep work, and you know what you’ll need. In TV, we don’t know what we’re shooting in the next two episodes. We don’t have the script. It’s more a game of evolution compared to a movie.”

The need to bring equipment and sometimes actors or stunt performers from out of town adds a logistical complication, especially in winter, when weather may affect whether a flight is going to arrive on schedule. In New York, a piece of equipment can be procured in a matter of hours; to get that same equipment to Richmond may take a few days.

“You have to plan for that,” she said. “The domino effect on (the production’s) departments and everybody it affects is quite large. But we are very lucky; we have an incredibly solid team.”

If that’s the challenge, what makes Richmond easier is the relative novelty of filmmaking and the willingness of residents and authorities to accommodate it, including shutting down streets temporarily for production.

“The city of Richmond and the various police and such have been really wonderful in helping us do what we have to do,” Stevens said.

“Homeland,” produced for Showtime by Fox 21 Television Studios and based on an Israeli TV series (“Prisoners of War”), spruced up the old “First Kid” Oval Office set and is using the stages previously utilized by “Turn: Washington’s Spies” near Richmond Raceway.

“I think we borrowed ‘Madam Secretary’s’ (Oval Office set) last year, and this one feels more true,” said actress Elizabeth Marvel, who plays President Keane. “No disrespect to ‘Madam Secretary,’ but this one has a little more space, and the way they light it is just amazing.”

Other portions of the White House have been built onstage, including the Roosevelt Room. The stage also houses a re-creation of the second floor of Carrie’s sister’s house (“so we’re not schlepping everything to the second floor (at the Ginter Park location), which makes it easier to film,” Stevens said).

Richmond’s Fan District has routinely stood in for Georgetown. A private home on Monument Avenue plays a Georgetown residence that’s host to a diplomatic party, and Carrie visits Julep’s on East Grace Street in the season premiere.

This season, Richmond will get to play itself for a scene of protesters in the streets, which was filmed in downtown at night.

“Homeland” also filmed at the Virginia Museum of Fine Arts (it played a high-end Washington law firm), used the state Capitol and its grounds as the White House and its grounds and cast Richmond’s Old City Hall as a U.S. Senate office building. A conference room in the Richmond Times-Dispatch’s downtown building will serve as a courtroom.

The show traveled to West Point and Moseley for some filming, and an upcoming episode features a medal ceremony at the Virginia War Memorial.

“It’s an interesting thing, playing the president,” Marvel said. “I am just an actress, but I do have to try to hold those feelings and thoughts and try to hold the idea of having that kind of responsibility, and being in an environment like that makes it very tangible.”

Andy Edmunds, director of the Virginia Film Office, said the seventh season of “Homeland” will spend more than $40 million in Virginia, the largest concentrated production expenditure for a single film/TV project ever in the commonwealth.

On any given day, “Homeland” may employ cast, crew and extras totaling 300. More than half are Virginia residents, Edmunds said.

“Three hundred people each day need to be fed, transported and paid, with all wages, whether a Virginia resident or out-of-state resident, subject to Virginia income taxes,” he said. “This is more usefully evaluated not only in the actual crew on set, but also by the hundreds of extras who are hired each week — some weeks more than others — and ancillary associated jobs that are supported by their presence.”

Edmunds said after “Homeland” wraps, Virginia will look to find additional productions, but he notes two possibilities were recently lost to Georgia and Canada “due to more available tax credits.”

Showtime already renewed “Homeland” for an eighth and possibly final season, but at this point, it’s unclear where it will film.

“Richmond is definitely in play, but we just don’t know for sure. Israel is also a possibility,” Gansa said. “But a lot depends on what happens in our next field trip to Washington, and, frankly, how this season is received. But we would all be very melancholy to leave Virginia.”

Edmunds will keep hope alive for more Virginia-based “Homeland” filming.

“Of course, we hope that there are elements of D.C. in the storyline, which would give us the opportunity to host the production for at least part of another season here in Richmond,” he said. “Most notable, however, is the relationship we have forged with Showtime/Fox that could result in more work here in the form of other shows as well.”

Rob Owen is a former Times-Dispatch staff writer. He can be reached at [email protected] or on Facebook and Twitter as @RobOwenTV.