Five days before a Loudoun County man was charged in a fatal shooting outside a grocery store in Gainesville, Va., he had been arrested on a charge of having a concealed weapon by a Fairfax County police officer who told a magistrate "he should not be let loose with a gun," a Fairfax police spokesman said yesterday.

The magistrate released Thomas Cumberland, 27, on his own recognizance after telling the officer there was no reason not to release him and that there was nothing more he could do, according to police spokesman Warren R. Carmichael.

The officer did not return to Cumberland a .44 magnum handgun that she had taken from his truck when he was arrested Nov. 26, and Cumberland retrieved it at the police station the next day, Carmichael said. The allegedly concealed weapon, a knife, was kept for evidence, he said.

Last Sunday, Cumberland, of 200 N. Emory Dr., Sterling, was arrested and charged with first-degree murder in the fatal shooting of Calan R. Derden, 43, of the 3600 block of N. 22nd Street, Arlington. Derden had stopped at a grocery store in Gainesville to buy a soda and was shot after an argument with a man armed with two handguns, according to Prince William County police.

In the previous incident, Carmichael said, Cumberland was arrested about 10:10 p.m. on Nov. 26 after police received a complaint from the security manager of the Zayre Department Store in Vienna about a man who was acting strangely.

The security manager, Stephen Kendrick, said yesterday that about 10 minutes after the store closed a man drove up to the front door and jumped out of his pickup truck. Kendrick said the man was in a highly excited state, declaring, "I've got to get in, I've got to get in. I've got to get in and buy a CB radio; you don't understand."

Kendrick said he directed the man to a drugstore down the street, which he knew was closed, and called police. Just as the officers arrived, Kendrick said, the man returned to the front of the store in his truck.

Carmichael said that the man was not acting strangely in front of the officers but was talking strangely. "He was talking about how dangerous Washington was; that there were F-15s poised to attack and bazookas on all the roofs," he said.

The officers found a knife and arrested Cumberland, Carmichael said. Cumberland was taken before Magistrate Robert Huber, who could not be reached for comment yesterday.

Prince William County police investigator Henry Wood said Cumberland was being held without bond at the Prince William County jail.

Wood said that Derden, who had a "frontier, Daniel Boone-style of dress" and was with a woman friend in the grocery store last Sunday, was approached by a man carrying a .357 magnum revolver in a shoulder holster and a .44 magnum handgun in a hip holster. The man asked Derden about his political affiliation, Wood said, and they got into a quarrel.

Derden was shot with a .357 magnum weapon in the left side of the chest, according to Wood, and died at Prince William County Hospital.

Loudoun County Sheriff's Department spokesman Terry McCraken said the department had received a complaint about Cumberland an hour before the shooting, but the officers who responded to the call could not find him and put out a "lookout."