The Tennessee National Guard recruiter accused of shooting three soldiers at an armory north of Memphis was formally charged in federal court on Friday.

U.S. District Magistrate Judge Diane Vescovo told Amos Patton he is charged with committing assaults within the maritime and territorial jurisdiction of the United States and carrying a weapon during a federal crime of violence.

Patton told the judge that he could not afford his own lawyer. Vescovo granted his request to appoint a public defender. Vescovo also scheduled a probable cause and detention hearing for Wednesday.

According to a criminal complaint, Patton had been ordered to go to the armory to be relieved of duty because of alleged misconduct. The complaint does not detail the nature of the misconduct.

The complaint written by FBI Special Agency Matthew Ross says Sgt. 1st Class Amos Patton was ordered to be told that he was relieved of duty, reduced in rank and recommended for removal from active reserve. 

Patton was ordered to return equipment that was in his vehicle outside the building, the complaint said. Patton had a "fanny pack" with him when he returned. 

When Patton tried to access the pack, one Guardsman yelled "gun," the complaint says. Patton then opened fire, hitting three Guardsmen, Ross wrote.

The complaint says Patton then ran from the building before another Guardsman caught up with him, subdued him and held him until Millington police arrived. The handgun was recovered at the shooting scene.

Millington police and National Guard officials said Thursday that a gunman had shot two of his superiors, who also were recruiters. They were identified by the Tennessee National Guard as Maj. William J. Crawford and Sgt. Maj. Ricky R. McKenzie.

One was shot in the lower leg and the other in the foot. Both have been treated and released from the Regional Medical Center in Memphis, a hospital official said.

Officials made no mention of the third victim during two news conferences Thursday. The nature of the third Guardsman's injuries, and his identity, were not immediately clear Friday. Guard spokesman Randy Harris did not immediately respond to a request for comment on the third injured soldier.

Ross' complaint says Patton committed assaults "within the maritime and territorial jurisdiction of the United States" and carried a weapon during a federal crime of violence. Formal charges were expected during a first appearance before a federal magistrate Friday afternoon.

His wife, Brenda, declined comment when contacted by The Associated Press on Friday.

Maj. Gen. Max Haston, adjutant general of the Tennessee Guard, said the two wounded recruiters were veterans who had served overseas. Asked Thursday about the discipline the gunman had faced before the shooting, Haston would say only that there were "administrative policies and procedures that we were going through with him."

Haston said security protocols were followed closely and he was proud that the shooter was quickly subdued by other soldiers.

"It makes me proud, but it also scares me to death that something like this can happen," Haston said Thursday.

Millington Police Chief Rita Stanback said the shooter did not have the handgun in his possession by the time officers arrived.

The armory, which houses a recruitment office, sits across the street from Naval Support Activity Mid-South on land that used to be part of a larger military installation. Navy officials ordered a lockdown there during the tense minutes after the midafternoon shooting, lifting it after word came that the gunman was in custody.

There are more than 7,500 military, civilian and contract personnel working on the Navy base, according to its website. The facility is home to human resources operations and serves as headquarters to the Navy Personnel Command, Navy Recruiting Command, the Navy Manpower Analysis Center and the U.S. Army Corps of Engineers Finance Center.

The Associated Press contributed to this report.