Mario Perez (left) was fatally shot during a holiday gathering in Damascus, Md., by his friend Frank Trujillo (right).

Frank Trujillo had a rule: Don’t mix work life with home life. Then he met Mario Perez, a colleague he quickly trusted, a dad whose son was the same age as Trujillo’s older boy and a gregarious buddy.

The night of Dec. 20, Perez, his 8-year-old son and girlfriend arrived for a holiday get-together at Trujillo’s neatly decorated home in Damascus, Md., 25 miles north of Washington.

The children played, drinks were served, and the two fathers made their way to the house’s lower level, talking about work. Trujillo, 35, is vice president and head of safety at Miller & Long, one of the area’s leading construction firms. Perez, a barrel-chested former active-duty Marine, also had worked there and, according to one close friend, wanted his job back.

The more Perez drank, at least one person in the home would later tell police, the more belligerent he became. Trujillo went upstairs into his bedroom, got his gun and came out.

What happened next — Perez following upstairs, Trujillo shooting him in the chest, Perez collapsing with a Christmas tree in the background — has emerged as one of the most hotly contested homicides in the region. The debate centers on Trujillo’s mind-set.

Frank Trujillo, who is charged with murder in Montgomery County in the shooting death of his friend, Mario Perez. (Family photo)

In the eyes of Montgomery County police, who charged Trujillo with first-degree murder, he could have called them for help but instead escalated events by getting his gun and needlessly shooting an unarmed man. ­Perez’s wide circle of friends share this view, saying the 40-year-old was a tough guy but not someone who would go after a close friend.

To Trujillo, the shooting was a justified way to stop a threatening man in an alcohol-fueled rage. “Self-defense, period,” his attorney, Barry Helfand, said in court Dec. 29, when he asked a judge to assign a $100,000 bond to Trujillo so he could leave jail pending further proceedings. Helfand told the judge that his client had “been threatened with death and serious bodily harm.”

Helfand was aided in his argument by a text message the victim’s girlfriend sent to the suspect’s wife about 10 hours after the shooting.

“Know that I don’t hold a grudge against anyone nor Frank,” she wrote. “He reacted in a defensive way. Thank you guys for having us over. I really enjoyed being there.”

And the attorney also got a boost in court from some executives at Miller & Long, a well-respected firm in the county and one of the largest general concrete contractors in the nation.

Trujillo has “been nothing but impressive,” the company’s chairman, John McMahon, told Circuit Court Judge John W. Debelius, adding that Trujillo’s skills as the company’s safety director likely saved lives in a very dangerous industry. “He’s a rising star in our company. And he is just solid as a rock. That’s why we’re standing here on his behalf today.”

Debelius gave Trujillo a $50,000 bond, an uncommonly low figure for a first-degree murder case, although the judge insisted that Miller & Long cosign it.

Mario Perez, who was fatally shot by his friend Frank Trujillo in Damascus, Md., loved to grill for friends, as he was doing in this recent photo. (Family photo)

Trujillo — who has a master’s degree in occupational safety and, according to Helfand, no criminal record — left jail that day.

Sorting through the dueling narratives are prosecutors at the Montgomery state’s attorney’s office, who must decide whether to hold to first-degree murder, which is punishable by life in prison, seek lesser charges or drop the case.

Complicating that review was the close relationship between Trujillo and Perez.

Perez, who was living in Northern Virginia when the shooting occurred, grew up in California, was a high school linebacker and joined the Marines in 1994, according to friends and military records. He left the service, where he was a computer systems specialist, in 1998 and entered the private sector in that line of work.

“A loving, sweet, curious soul who loved to laugh and learn,” said Jenny Johnston, a girlfriend who lived with Perez from 2004 to 2007.

In their bedroom, she recalled, Perez kept framed art that listed eight principles associated with Japanese samurai, which he recited daily: ­justice, courage, benevolence, politeness, honesty, honor, loyalty, character.

After they broke up, Perez had a son. Perez and the boy’s mother split up, but he remained active in their child’s life with money and time, according to friends and letters filed in court.

In 2013, according to his LinkedIn profile, Perez went to work for Miller & Long, where he earned kudos for his reliability. Outside of work, though, he had a problem with drinking — a problem that came to a head in the early hours of April 22, 2015. While driving a Chevy Impala in the Crystal City area of Northern Virginia, he made a right turn on red against a sign barring that.

An Arlington police officer pulled him over, noted his slurred speech and asked Perez how much he’d had to drink.

“Too much,” Perez replied, according to an incident report.

Officers searched his pockets. They wrote that they found receipts for purchases that night of beer, tequila and sake. Perez’s blood alcohol level tested at 0.17, about twice the legal limit for driving, according to court records.

Prosecutors charged him with a multiple-DUI count, due to two drunken-driving convictions within the past 10 years. Perez pleaded guilty Oct. 22.

He told friends he wanted to straighten out his life.

“I’ve been through the ringer this past year,” he wrote in a Nov. 30 text message to Johnston, his former girlfriend. “I’m so tired, Jennygirl. I realized that I have to focus!! To spend more time on the things that matter and not waste time on the things that don’t. The chaos is all around me. I don’t want it anymore. . . . I am just focusing on my son and leaving the drama and BS behind me.”

The court scheduled a sentencing hearing in Perez’s case for Jan. 8.

Several people wrote letters on his behalf, including Trujillo.

“I met Mario when he joined our construction company,” Trujillo wrote. “I came to trust him as a person that could be relied upon to achieve important goals and offer an overall positive contribution to any project. I came to trust Mario enough to do what I have never done before in my career, invite he and his family to my home for an evening cookout. I normally try to keep my work and personal spaces separated, but I felt that I could trust Mario and I wasn’t disappointed.”

Trujillo wrote that his family enjoyed the visit and arranged many more, adding, “my sons and his son were especially thrilled to see each other and play together.”

On Dec. 20, Perez, his girlfriend and his son arrived with plans to spend the night. Perez cooked for the gathering as he drank, according to Helfand, Trujillo’s attorney.

Trujillo also was drinking, but not as much, Helfand said.

“They get into an argument over nothing, an employment kind of argument,” Helfand would later say in court.

Trujillo retrieved his gun from his bedroom. Perez came upstairs to a kitchen area. Trujillo came out, Helfand said, with his gun at his side.

“Calm down,” Trujillo said, according to Helfand. “I’ll call you a cab. I’ll get you an Uber. . . . Calm down. Please respect my home.”

Helfand said that Perez continued threatening Trujillo and approached him, even though Perez was now looking at a raised gun.

“My client shoots him one time,” Helfand said.

Operators at the county’s 911 center received a call from Trujillo’s wife, according to arrest documents, saying Perez had threatened them and her husband had shot him.

When police officers arrived, they saw Perez with a gunshot wound to the chest. Trujillo told him that he was sorry and that his gun was on a cabinet by the back door.

In two court hearings, prosecutor Patrick Mays has outlined the basic parameters of his case: Perez was unarmed, and Trujillo escalated the confrontation by getting his gun.

Mays said that Trujillo didn’t try to retreat, or call 911 before getting the weapon, and that he didn’t have to shoot.

“There was no reason for this person to be murdered,” Mays said.

Jennifer Jenkins contributed to this report.