Spain's case against a U.S. citizen accused of being part of a group that allegedly stormed the North Korean Embassy in Madrid with weapons and beat and tied up the staff before making off with electronics and hard drives became clearer Tuesday when a federal judge in Los Angeles ruled to unseal court documents at a detention hearing.

The unsealed documents state that Christopher Philip Ahn was among the group that entered the embassy in February with knives, iron bars, machetes and imitation handguns and left with a mobile phone, computers and hard drives.

Spain hopes to have Ahn, 38, extradited in the alleged attack.

The arrest warrant out of Spain lists a half dozen criminal counts against Ahn including breaking and entering, illegal restraint, threats, robbery with violence and intimidation, causing injuries, criminal organization.

Surveillance video at the North Korean Embassy to Spain in Madrid shows U.S. Marine veteran Christopher Ahn as he prepares to enter the embassy on Feb. 22, 2019. Ahn, suspected of involvement in a mysterious dissident group's February raid on North Korea's embassy, has been denied bond by a federal judge and must stay in custody. Department of Justice via AP file

Magistrate Judge Jean P. Rosenbluth also ruled that the probable cause warrant for the arrest of Ahn was framed by a prevailing Extradition Treaty between Spain and the United States, though the formal process for Ahn facing charges in Spain has not yet begun and could be lengthy.

The defense lawyer for Ahn had asked for the proceedings to be sealed to protect the safety of the accused, given the North Korean regime’s history of hunting down its opponents and critics.

A former U.S. Marine, Ahn was arrested Thursday in California by U.S. Marshals, who recovered a fully loaded Springfield Armory Sub Compact Model .40-caliber semi-automatic pistol and a second magazine with ten. 40-caliber rounds of ammunition, according to court documents.

The U.S. attorney's office argued Ahn should be held in federal custody because he was a flight risk and "the serious and violent nature" of the alleged crimes, his military training and his familiarity and access to firearms. It noted that bail in any amount would not guarantee his presence in court and would invite the possibility of embarrassing the United States.

Supporters of the group that claimed responsibility for the raid on the embassy, Free Joseon, said they were surprised and disappointed that U.S. authorities had chosen to issue arrest warrants based on the Spanish extradition request, possibly raising the risk that the accused eventually could be handed over to the North Korean government.

They also argued that the accused are human rights advocates focused on the plight of North Koreans living under Pyongyang’s authoritarian rule and do not have a history of criminal conduct.

On its website, Free Joseon has denied it used force when its members entered the embassy in Madrid.

NBC News Investigations reported in March that the opposition group that stormed the North Korean embassy said it handed over stolen data to the FBI, and a law enforcement source familiar with the matter confirmed to NBC News that the bureau had received the information.

Ahn arrived in Madrid via New York's JFK Airport on Feb. 22, according to the Complaint For Provisional Arrest With A View Towards Extradition. Later that day, another man identified as Adrian Hong Chang came to the North Korean Embassy and asked to see its charge' d' affaires, the diplomat who oversees the embassy. Hong was asked to wait as the individual identified in the complaint by their initials allowed Hong Chang on the embassy ground and to wait on a bench.

Hong Chang opened the door to let others in the group into the compound, and security images show Ahn entering with the others, the document states.

The complaint identified Ahn as being part of the group that allegedly attacked an individual identified as Y.S.S. The group took him to a bathroom and tied his hands behind his back, placed a bag over his head and threatened him with iron bars and imitation handguns, according to the complaint. During the incident, the wife of one of the Embassy workers allegedly suffered injuries trying to escape through a terrace.

When Spanish police arrived, Hong Chang appeared wearing the face of the North Korean president on his jacket lapel and represented himself as the person in charge, the document states. He reportedly told police that if a North Korean had been injured, police needed to officially inform the Consulate.

Meanwhile, two members of the group identified themselves as members of a human rights group, took the charge' d' affaires to a basement and asked to leave North Korea, the complaint said. He refused and then they allegedly tied him up and put a bag over his head.