New York CNN Business  — 

Four astronauts are on their way home from the International Space Station aboard a SpaceX Crew Dragon capsule, ending their five-month mission to the orbiting laboratory. The astronauts set a record for the longest time in space by a crew that launched aboard an American-built spacecraft.

The discrepancy centers on SpaceX’s activities in South Texas, where the company has taken over large plots of land near Boca Chica Beach in order to build and test massive rocket prototypes of the rocket that CEO Elon Musk envisions will one day carry the first humans to Mars.

The frequent road closures and traffic jams SpaceX has brought to the area, as well as the explosive rocket testing mishaps that have littered the local beaches with shrapnel, have often rubbed local residents and environmental activists the wrong way. Now, the district attorney of Cameron County, which encompasses Boca Chica Beach, is warning SpaceX that its actions could make the company and, possibly, employees “subject to arrest and prosecution,” according to a June 11 letter obtained by CNN Business.

The contents of the letter were first reported by local television station KRGV.

In the note, Cameron County district attorney Luis Saenz alleged that members of his staff, while investigating complaints from a resident about the behavior of SpaceX’s private security personnel on June 9, encountered a man wearing a “tactical bulletproof vest” who “approached, stopped and detained” them for attempting to access a public roadway near SpaceX’s manufacturing facilities.

Saenz’s letter states that the county had not authorized a road closure at the time, and his staff later found out the security guard who detained them was not licensed by the Texas Department of Public Safety, as is required by state law.

“This conduct is unacceptable,” the letter reads, adding that Saenz was further concerned by the fact that SpaceX responded to that incident and another, similar incident in early April by chocking up the incidents to an “overzealous security guard.”

“While Space-X is a valued member of our community, this does not authorize Space-X, its employees, staff, agents, and/or contractors to disregard Texas Law,” the letter states. “Also, be advised, if this conduct were to happen again, not only could the individual Space-X employee/contractor/agent be subject to arrest and prosecution, but as a Texas Business Entity…Space-X could be prosecuted as well.”

SpaceX did not return requests for comment.

The letter also lays out complaints about the extent to which SpaceX has restricted access to Boca Chica Beach, which is one of the nearest beaches to the city of Brownsville and one of the last undeveloped stretches of coastline in the state. SpaceX is only authorized to close the beaches for up to 300 hours per year for rocket testing and launches, according to an agreement with the Federal Aviation Administration.

But just six months into 2021, the company has already shut down the beaches for about 385 hours, according to Saenz’s letter.

SpaceX’s actions could amount to a Class B misdemeanor (for “obstructing a highway or other passageway”) and a third-degree felony (for “impersonating a public officer”), the letter states.

The letter — which is addressed to SpaceX’s head of Starship operations, Shyamal Patel — also requests that SpaceX respond with legal justification for its action by June 14, though it’s not clear if SpaceX has responded. Saenz’s office did not respond to a request for comment on that matter.

Saenz’s letter states that his office was tipped off to issues with SpaceX by Save RGV, a local environmental advocacy group.

Mary Angela Branch, a Save RGV advocate and resident of Port Isabel, the town adjacent to Boca Chica Beach, told CNN Business that she began gathering evidence of SpaceX’s actions after hearing from a friend that SpaceX security guards were allegedly forbidding people from accessing public roads without authorization from the county.

“I don’t know how they’ve gotten away with all of that,” Branch told CNN Business. “It’s scary.”