Situated deep in the Mojave desert, Llano is secluded — and that’s always been one of its biggest selling points.

More than a century ago, the hamlet was home to a storied Socialist cooperative that historians described as one of America’s most significant Utopian societies. The Llano Del Rio Cooperative Colony is long gone, but its stone remains are perhaps the biggest attraction in a place marked by vast open spaces dotted with homes on sprawling lots.

One of those homes was Carl Grillmair’s. To him, the remoteness of Llano was its prime attraction. Grillmair, 67, was a Caltech astrophysicist, and colleagues said he was drawn there because, unobstructed by city lights, the desert offered clear views of the cosmos at night.

Freddy Snyder was another member of the community, a married 29-year-old father of two living with his mother just two miles from Grillmair.

On Feb. 16, authorities allege, their lives collided on Grillmair’s front porch when Snyder arrived at the home and fatally shot the astrophysicist.

The killing shocked both the Caltech community, where Grillmair was a beloved researcher, and the sparsely populated community.

“Out in the country, we don’t deal with those kinds of issues,” said one Llano resident who recalled his own run-in with Snyder but asked to not be identified for fear of his safety. “We got away from all those, or at least we thought.”

Now, Los Angeles County Sheriff’s Department detectives are trying to unravel what sparked the deadly shooting.

Officials and court documents indicate that weeks earlier, Snyder had had a run-in with Grillmair.

On Dec. 20, Lt. Michael Modica of the Los Angeles County Sheriff’s Department said, the scientist spotted someone possibly trespassing on his property and called law enforcement.

When deputies arrived and found Snyder in the area, Modica said, he was carrying a rifle and explained that he was on his way to the post office.

Grillmair’s home and the local post office are in opposite directions from Snyder’s home, property records show.

According to the Los Angeles County district attorney’s office, Snyder told deputies he was carrying the rifle just in case he ran into wild animals. But deputies noted that the rifle was loaded and not registered to Snyder, so they took him into custody.

In addition to one felony count of carrying a loaded firearm, the criminal complaint against Snyder charged him with trying to escape from the Palmdale station jail the day after he was arrested.

A spokesperson for the Sheriff’s Department told The Times that deputies at the Palmdale station have no record of an attempted escape that day.

When Snyder appeared in court Dec. 23, he was released on his own recognizance and ordered to complete a hunters safety course and obtain a hunting permit.

At his next court hearing Feb. 5, prosecutors asked the judge to drop the charges.

“The defendant had no prior criminal record,” a spokesperson for the district attorney’s office said in a statement. “The case was dismissed after the defendant complied with conditions that were part of an agreed upon disposition.”

Snyder’s public defender on the case declined to discuss it.

But between that initial court appearance in December and the charges being dropped in February, authorities say, Snyder continued to show up on local law enforcement’s radar.

On Dec. 28, a resident in the nearby community of Valyermo spotted Snyder on his property, the resident told The Times when reached by phone.

“We threw him out,” said the resident, who asked not be identified out of fear for his safety. “He squeezed through a gate and … the door wasn’t locked and he got in. We’re in a big property out here, and he got in the house.”

Snyder has since been charged with first-degree burglary in connection with that incident, court records show.

“This guy does this sort of thing around the neighborhood,” Modica said.

Investigators have not yet determined what Snyder was doing at Grillmair’s property last week and haven’t found any indication that anything was taken, Modica said.

“I don’t think our victim knew Freddy Snyder,” Modica said.

After the shooting, Snyder allegedly threatened his mother and took her car, Modica said. He was stopped and arrested on suspicion of carjacking and then identified as a suspect in Grillmair’s slaying, authorities said.

He is due in court March 26 for his arraignment.

Meanwhile, Grillmair’s loved ones and colleagues are mourning the sudden death of a man who was fascinated with exoplanets, stellar streams and the remnants of ancient collisions between the Milky way and other galaxies.

Born in Alberta, Canada, Grillmair was interested in astronomy at an early age, according to a statement released by Caltech. He had earned a doctorate from Australian National University.

He joined Caltech’s IPAC Science & Data Center for Astrophysics & Planetary Sciences in 1997, and was a member of NASA’s Spitzer Space Telescope Infrared Spectrograph and Infrared Array Camera instrument support teams, according to the university.

“He was part of IPAC’s bedrock for many years, and his passing impacts all of us across IPAC,” Tom Greene, IPAC’s executive director, said in a statement.

Grillmair — who had discovered and named several stellar streams, star associations that orbit a galaxy — was also an avid pilot of small aircraft and gliders. Friends said he loved the outdoors and kept a small observatory with several telescopes in his home in Llano.

“It was always a pleasure to experience Carl’s creativity in doing science,” said Sergio Fajardo-Acosta, a fellow astronomer who worked alongside Grillmair at IPAC for more than 20 years. “His methods on exoplanets and galactic structure studies were truly detective work.”