A Prince George's County police officer fatally shot a 19-year-old Lanham man early yesterday after the man allegedly grabbed the gun of another officer during a melee at a community festival, officials said.

Police said the first officer, who was not identified yesterday, was off duty when the shooting occurred. He and another off-duty officer were helping provide security for the festival at the West Lanham Hills Fire Department when a series of fights involving more than 25 people erupted in the station parking lot about 2:30 a.m. yesterday, police said.

Police said yesterday's incident in Lanham began when someone in the crowd told the officer that men sitting in a car had weapons. The officer then requested assistance, police spokesman Lt. Andrew Ellis said.

A third officer who arrived at the fire station, in the 8500 block of Good Luck Road, approached the car and ordered its passengers to "show their hands," Ellis said.

Instead, Gary Albert Hopkins Jr., 19, of the 9700 block of Woodberry Street, left the car and walked up to the officer, who had drawn his gun, Ellis said.

Ellis did not say where the officer pointed the gun but said Hopkins grabbed it, prompting a "very intense struggle" between Hopkins and the officer.

The off-duty officer who had called for assistance then ran to break up the scuffle. He drew his gun and fired one shot into Hopkins's upper chest, Ellis said. Hopkins lost his grip on the officer's gun and put his hands in the air, Ellis said.

He was taken by ambulance to Doctors Community Hospital, also in Lanham, where he was pronounced dead at 2:59 a.m., a hospital spokeswoman said. An autopsy is scheduled this week at the state medical examiner's office in Baltimore, officials said.

Police said they did not know what triggered yesterday's melee. A Prince George's Fire Department spokesman said fire stations routinely rent out space for private gatherings, but he did not know who hosted the party.

Hopkins was the fifth person since April to die after struggling with Prince George's police. Two suffered heart attacks during fights with officers. In May, an officer fatally shot a Forestville man after he allegedly assaulted the officer, pinned her to the hood of her patrol car and tried to take her gun.

Most recently, an officer fatally shot a man in June during a traffic stop in Laurel after the man allegedly fought efforts to arrest him.

Hopkins's family spent much of yesterday in mourning at his mother's home. Hopkins's aunt, Debbie Renea Hopkins, described him as an ambitious, aspiring journalist with a sharp sense of humor. He graduated from DuVal High School in Lanham and spent a year at J.C. Smith College in North Carolina.

Last year, her nephew wanted to return home and enrolled at Prince George's Community College, where he studied journalism, Debbie Hopkins said. News of the young man's death compounded his family's grief; his father, Gary Albert Hopkins Sr., had died less than two weeks ago.

"It's a very challenging time," Hopkins's aunt said. "We don't know what stories have been told. . . . We only know that the truth will prevail."

The officer, a two-year member of the force, was immediately placed on administrative leave during investigations by the department's homicide and internal affairs units. He will undergo psychiatric evaluation, as is standard in such cases, an official said.