A judge has dismissed a lawsuit from families of victims that were murdered in the 2015 terrorist attack in San Bernardino, California, and exonerated the government from claims of negligence.

Families of three victims say that the government did not do enough to prevent the terror attack that claimed 14 lives and wounded two dozen others.

U.S. District Judge Andrew Guilford said he was sympathetic to the families, but that the government's sovereign immunity prevented the lawsuit from proceeding further.

"The heightened tragic circumstances in this case do not create an exception to the legal principle that private citizens may not sue the government in tort for making discretionary, policy-oriented decisions," Judge Guilford said in the decision.

"A contrary result would be both legally and politically unworkable," he explained. "The court's strongest sympathies lie with the victims of this shooting and their families. But this case lacks a legal foundation to move forward."

The plaintiffs argued that the government did not do enough to investigate the couple before letting them into the country. They also charged that the couple's friend, who supplied them with weapons, had ties to an Islamic organization that had links to terrorism.

The judge ruled that the sovereign immunity of the government was created to prevent exactly these kind of lawsuits.

The San Bernardino police said that the Muslim couple might have been triggered to attack because of the Christmas decorations at a mandatory training session.

Here's more about the 2015 terror attack: