Beretta announced it's moving its manufacturing facility out of Accokeek, Md., and going to Gallatin, Tennessee. Their building is pictured in Accokeek on July 24. (Sarah L. Voisin/The Washington Post)

(Related: Also leaving Md. for Tennessee: The military’s M9 sidearm)

During nearly 40 years making guns in southern Prince George’s County, Beretta USA has endured a complicated relationship with a state dominated by Democratic lawmakers and left-leaning voters­ who don’t usually embrace the famous gunmaker’s products.

“Some people considered the factory a good source of jobs,” said Kelly Canavan, a longtime resident and local activist in Accokeek­, Md., the company’s home since 1977. “But a lot of other people have been disturbed that this huge gun factory is right here, extremely close to a lot of children and families.”

The culture clash escalated after the 2012 shooting at Sandy Hook Elementary School in Newtown, Conn., where Adam Lanza killed 27 people, including 20 first-graders. In the political furor that followed, Maryland banned 45 types of assault weapons and put in place tough fingerprint, photo identification and training requirements — restrictions viewed by Beretta as the legislative equivalent of a declaration of war on its operations.

Last week the gunmaker fired back, announcing that it will move its manufacturing operations before the Free State tries to impose even more onerous restrictions.

Joe Brown, 32, of Indian Head, Md., gets his hair cut at Bryans Road Barber Shop in Bryans Road, Md. He was laid off from Beretta after five years of employment. (Sarah L. Voisin/The Washington Post)

Instead, it will make its weapons in Tennessee, where an un-Maryland type of law went into effect this summer: Residents without carry permits can now keep loaded guns in their cars.

In moving south and taking 160 jobs with it, Beretta joins several other prominent gunmakers abandoning liberal states that passed tough gun laws after the Newtown shooting. PTR Industries left Connecticut for South Carolina. Kahr Arms is leaving New York for Pennsylvania. O.F. Mossberg & Sons decided to expand in Texas rather than in the Northeast.

Although there are often labor and operating cost savings that come with moving south — and big tax incentives from states desperate to attract new jobs — Lawrence G. Keane, general counsel for the National Shooting Sports Foundation, said that ultimately the most convincing pitch from states such as Tennessee is, “Our legislature will not pass these sorts of laws.”

“At the end of the day, these companies are running a business, and they’re reaching the point where the economics and aggravation are converging,” Keane said.

Beretta, owned by the prominent Beretta family in Italy, arrived in Accokeek in the 1970s, when the area was far more rural than it is today. The population has grown 40-plus percent in the past decade to just more than 10,000 residents, according to census data. Although it feels like the middle of nowhere, the trappings of suburbia have popped up, including large houses occupied by people who commute to Washington. The median household income is $123,700.

Beretta took over a small gunmaker in Accokeek, F.I. Industries. Almost immediately, there was a confrontation. County politicians who backed state-insured loans for the company, thinking it would make only target pistols there, withdrew support after learning that the firm would make a gun then prohibited from being imported into the country. Residents also complained to local officials about guns being made in their back yards.

One of the politicians opposing the loan was Parris Glendening (D), then a county council member.

“The issue with them has always been resistance to any type of reasonable gun control,” said Glendening, who later, as Maryland’s governor, tangled with Beretta over an idea for personalized handguns. Making powerful handguns and assault rifles “is not part of the Maryland culture,” Glendening said. “It’s not who we are.”

Jeff Reh, a board member at Beretta, said county executives have never supported or even visited the company, despite the more than $30 million it paid in state taxes during the past 15 years and its sponsorship of a nearby hospice and local community events.

The first governor to visit the plant was not from Maryland. It was Texas Gov. Rick Perry (R), who came last year to entice executives. In wooing and finally winning the company, Tennessee Gov. Bill Haslam (R) flew to Italy to meet with the Berettas.

“That’s an important distinction from a business point of view,” Reh said. “We’ve never had anything like that here.”

The average tenure of employees at the plant is 14 years, and about 50 percent of workers are minorities. A good number are women. The company declined to allow a reporter to speak with any current workers.

Over the years, former employees said they have felt a disconnect between the pride taken in their work and what people outside think of it, especially after high-profile mass shootings that generate negative headlines for the industry.

“This was a means to finance a household, to have a decent life,” said John Chanslor, who worked at the plant from 1987 to 1996. “We didn’t see ourselves as building guns to kill people.”

There was extreme honor, Chanslor said, in making the M9 handgun for the military. At the beginning of the first Iraq war, he hung an American flag on the assembly line.

“And I heard nothing but cheers,” he said. “So you tell me how people felt working there.”

Joe Brown, who said he was let go from the plant last week because of attendance problems, made $10.23 an hour machining gun barrels. He loved the work. Waiting to get his hair cut at a barbershop not far from the plant, Brown said employees “were getting more frustrated than they used to be” with Maryland’s gun laws.

“Some of them think Maryland is forcing them out,” he added.

Glendening rejected that idea. “They don’t avoid these regulations simply by moving to Tennessee,” he said. “No state should be forced to take public policies that are harmful to their citizens under the threat of losing jobs.”

Reh, the Beretta board member, said some of the 160 employees affected by the decision have expressed interest in moving to Tennessee, and one group of workers — the gunsmiths — are disappointed that their jobs aren’t moving. They want to live in a less restrictive state for gun owners, but because of their role in customer service, they are staying in Accokeek, along with executives and administrative workers.

Moving to Tennessee will give Beretta’s firearms a symbolic but increasingly important marketing component: engraving that says the guns are made in Tennessee, not Maryland. The location marks are a federal requirement, and Keane, the general counsel for the National Shooting Sports Foundation, said gun enthusiasts are becoming more and more annoyed when they see reminders about unfriendly states on their purchases.

“The customer knows exactly where those guns are made,” Keane said.

Maryland has become a dirty word among some gun owners.

At B&J Carry-Out, a popular lavender-and-red, squat sandwich joint just off the main highway through town, opinions clashed on Beretta’s decision.

Ray Banks, a retired Vietnam veteran and 20-year resident of Accokeek waiting for his bacon-and-egg sandwich, said: “This isn’t about economics. It’s political. I don’t think that’s right. I think they’re overreacting to what the American public thinks about guns. There should be some controls.”

Others couldn’t disagree more. “I don’t own a gun,” another customer said, “but everyone has a right to own a gun. It’s in the Constitution, right?”