A grand jury cleared a Montgomery County police officer yesterday of criminal misconduct in the shooting death of a man who allegedly attacked the officer with a long-handled flashlight during a scuffle outside a Gaithersburg hotel lounge where the officer was working as a security guard.

The county Circuit Court grand jury found that Officer Harold K. Allen, a three-year member of the force, acted lawfully when he shot George P. Valltos, 37, of Germantown in the parking lot of the Sheraton Potomac on Nov. 21, the state's attorney's office announced last night.

Valltos, who had a criminal record and a history of mental illness, had been ejected from the hotel's lounge by Allen for rowdy behavior and was shot twice by the officer in a scuffle that followed in the parking lot. Detectives who investigated the shooting said yesterday that Allen fired after Valltos grabbed the officer's metal flashlight and moved to strike him with it. Allen, 28, was not injured.

Lt. Robert E. McKenna, chief of detectives in the Rockville District, where the shooting occurred, said an autopsy showed Valltos had consumed alcohol and ingested cocaine and the hallucinogenic drug phencyclidine, known as PCP.

Police Chief Bernard D. Crooke Jr. said last night that with the criminal investigation finished, the police internal affairs unit will prepare a report for him on whether Allen violated any department policies, particularly rules governing the use of deadly force.

"They'll have it to me very quickly," Crooke said. He said he will then decide whether disciplinary action is warranted. "From all indications, though, it looks like he was acting in defense of himself."

The evidence presented to the grand jury was gathered by detectives in McKenna's unit who sought to determine whether Allen had committed a crime. Crooke described the procedure as routine when police officers are involved in shootings.

McKenna said the detectives found that Allen was threatened with serious harm and acted properly in self-defense. He said the flashlight, 17 inches long, was designed also to be used as a club.

While the police internal affairs report is being prepared, Allen will continue in an administrative job at the Wheaton-Glenmont District station, without a gun or police powers, according to his supervisor, Capt. Max E. Whitehead.

The shooting was the first of two involving Montgomery police officers in recent weeks. Last Friday night, an officer shot and killed a 17-year-old Wheaton youth who allegedly moved to strike him with a baseball bat.