Driving down the bucolic back roads of Maine, it’s hard not to get swept up in the scenic beauty: jagged seacoasts, landmark lighthouses and quaint shops all stud the area. But as the small town of Kittery comes into view, the mood shifts from a laid-back beachy vibe to a fast-paced military operation.

As tensions continue to escalate between the United States, North Korea and Iran over nuclear capabilities and intentions, thousands of civilians and Navy personnel at the Portsmouth Naval Shipyard are hard at work overhauling, repairing and modernizing U.S. submarines that could one day be sent into battle.

“The economic impact is huge.” — John Joyal, Seacoast Shipyard Association

The shipyard is always busy – and one of four Navy-owned and operated in the U.S. that is currently ramping up its work – courtesy of the Trump administration. Employees are tasked with making sure subs are warfighter-ready – and have no room for error.

The Navy recently got the go-ahead to expand its current fleet of 275 deployable ships to 355 over the next decade. The order means thousands of U.S. jobs are up for grabs now in Kittery, as well as at the Navy’s shipyards in Bremerton, Wash., Norfolk, Va., and Pearl Harbor, Hawaii.

The submarines they will make are the ultimate self-contained war machines, but the process of building them carries economic benefits out to surrounding communities like concentric waves.

When the shipyard does well, the community does well.

“The economic impact is huge,” John Joyal, chairman of the Seacoast Shipyard Association, told Fox News. “Real estate, merchandise, gas stations, restaurants… everything is connected. We give back to the community and the community gives back to us.”

Joyal, now retired, is a third-generation shipyard employee who has worked on the base for nearly 40 years. His grandfather worked there during World War II, followed by his father and then him. Now, his son is employed there as a third-year apprentice electrician.

“It’s kind of a family business here,” Capt. David Hunt, commander of Portsmouth Naval Shipyard, recently told Fox News. He added that “pride, respect and ownership” are all tenents of the shipyard where military members and civilian personnel have worked side-by-side for years.

Located on the southern tip of Maine, PNSY encompasses the federally-owned Seavey Island which sits at the mouth of the Piscataqua River and is across the harbor from Portsmouth, New Hampshire.

Officially created on June 17, 1800, under President Thomas Jefferson, the shipyard has weathered two centuries of transitions from sail to steam to atomic and nuclear fuel. During both world wars, production at PNSY was unsurpassed by any other naval submarine facility in America.

Today, it encompasses more than 297 acres and is a bustling mini-city. There are approximately 300 buildings with more than four million square feet of space including 49 ship repair and overhaul buildings.

It’s got three dry docks and is capable of handling all active classes of submarines including the Los Angeles-class and a new generation of subs – the Virginia class.

The Virginia-class behemoths are among America’s most efficient and lethal defense systems at sea. They can launch tomahawk cruise missiles and deploy a team of Navy SEALS from beneath the surface.

New Hampshire Democrat Sen. Jeanne Shaheen told Fox News that the shipyard is “not only critical to our national security, but is also a vital economic engine for New Hampshire’s Seacoast.”

"The Portsmouth Naval Shipyard represents the gold standard of public shipyards in our country,” she added.

To underscore the point, Shaheen successfully petitioned the Department of Defense to exempt PNSY employees from a government-wide hiring freeze the Trump administration imposed just days after taking office in January.

This year, the base is on track for making 480 new hires.

In 2016, the shipyard made 650 new hires and accounted for $756.1 million in total economic activity, according to an annual report from Seacoast Shipyard Association. There were 6,914 civilian jobs with a payroll of about $496.2 million - an increase of more than $14 million from 2015.

About 57 percent of the shipyard’s civilian employees come from Maine. Last year, the shipyard paid $282 million in wages to more than 3,800 civilians across 58 communities in the state.

In New Hampshire, 2,535 civilian workers from 58 communities were paid $177.7 million, while another 282 civilian workers from 24 cities and towns in Massachusetts accounted for $16.6 million.

“The impact of the shipyard is pretty big and has a wonderfully positive effect on the community,” Valerie Rochon, president of the Greater Portsmouth Chamber of Commerce, told Fox News.

It's a partnership both the military and the towns supporting it respect and protect.

In February, when the nuclear-powered attack submarine USS New Hampshire arrived at the PNSY for maintenance work, sailors offered to work in the community. Community leaders, in turn, hosted officers on a thank you cruise on the Gundalow to kick off Portsmouth’s “Hit the Decks” summer celebration.