Two persons were critically injured early yesterday in a melee that developed when a first-day-of-summer party in rural Montgomery County was invaded by members of at least four motorcycle gangs.

Police estimate that more than 500 people were at the farmhouse in Derwood when the fighting broke out shortly before 2 a.m.

Thomas W. McKnight, 26, of Silver Spring and Bruce T. Muir, 20, of Rockville were listed in critical condition in Suburban Hospital's intensive care unit yesterday. The two men, who witnesses said fought each other at the party, are both being treated for multiple stab wounds in the chest.

According to Timothy J. Arnold, 20, being treated at Montgomery General Hospital for stab wounds in his left leg, the fight broke out when he asked whether someone at the party had a gun. While he was inquiring, someone allegedly fired two gun shots that missed him. Arnold said he then tried to get the gun but was stabbed.

The party took place in a sprawling, overgrown farmhouse in an isolated area on Muncaster Mill Road. The six persons who rent the house had invited about 250 guests to the party, which they had been planning for a month, according to one of the tenants.

The party began at 3 p.m. Saturday and the motorcyclists began arriving around midnight.

"I know some people who ride motorcycles," the same tenant said yesterday, "and I guess the word about the party got around to some of the gangs. We didn't invite them, though, and we don't even know any of the people who fought."

Yesterday the remnants of the party -- two dozen full trash bags, two bath-sized metal ice tubs, and two rented Sanijohns still remained. A tenant was cleaning up the yard and hosing down the blood that dried on a concrete walkway near the farmhouse.

"When I walked into the kitchen this morning it looked like Helter Skelter," another resident said. McKnight, bleeding heavily, had been taken to the kitchen to await paramedics.

The house, surrounded by hundreds of acres of cornfields, is located on a two-acre lot. The closest neighbor is a few minutes' drive down a one-lane road. These neighbors said they couldn't hear the party from inside their house, but said the motorcycle noise kept them awake most of the night. They described the farmhouse residents as "nice, pleasant kids" with whom they have had no complaints.

Police said they are investigating the incident.