At least four persons were killed last night in a two-alarm fire that blazed through a vacant Northwest Washington row house where fire officials said homeless people had apparently taken shelter from the first cold weather of autumn.

The death toll in the three-story house at 1637 13th St. NW just north of Logan Circle, was the greatest in a single fire here since Feb. 1, when a blaze killed seven persons in a row house a little more than a half mile away. Last night's four victims were not identified immediately.

"It looks like they were homeless people trying to stay warm," said fire department spokesman Ray Alfred. After a long period of almost summery autumn temperatures, the mercury plunged into the 40s last night.

The door and first-floor windows of the house where last night's blaze occurred were sealed shut and Fire Chief Theodore R. Coleman said that apparently contributed to the tragedy.

"Because the doors and windows were boarded up, it seems the people could not get out," he said. It was not clear how the occupants of the building had entered, Coleman said, but it appeared that the outbreak of the fire prevented them from leaving by the same route.

One of the victims, described only as a man, was found on the second floor of the house, fire officials said. Authorities said his body showed little sign of burns, and it appeared he may have been overcome by smoke. The others, for whom no description was given, were found on the top floor.

The fire was reported about 9:30 p.m. after the crew of a city ambulance driving nearby smelled smoke, saw flames, and heard screams.

A man attending a party nearby said he wanted to make his way into the building, but was restrained by members of the ambulance crew.

The cause of the fire was not immediately known, but Alfred said he believed it started beneath a staircase in the basement and spread upward. Seventy firefighters battled the blaze for more than an hour before extinguishing it. Three firefighters were injured.

Two suffered first- and second-degree burns. The third suffered an arm injury.

Scores of neighborhood residents, bundled against the cold, looked on as firefighters, in the glare of floodlights, climbed ladders to the roofs of neighboring buildings, then trained hose streams on the burning structure.

Smoke and the smell of smoke filled the street, which swarmed with firefighters and their fire hoses, and was littered with debris from the heavily damaged row house.

The huge demand for water to fight the blaze caused a water main to rupture on the north side of the 1300 block of R Street, according to a city water service crew chief.

Russell Wilson, the crew chief, blamed fluctuations in pressure for the rupture of the main, which he said caused the water supply to be cut off to a dozen houses.

Repairs to the main were expected to be completed quickly, Wilson said.

Chief Coleman said some firefighters stationed at engine houses in the area were at another, smaller fire about a dozen blocks away, at 12th and H streets NW, when the call came for the 13th Street blaze. He said it was possible those firefighters might have arrived at 13th Street a minute or so earlier if they had not responded to the other call.

Damage from the H Street fire was reported relatively minor and no injuries were reported there.

The seven persons who died in the Feb. 1 row house fire in the Shaw area represented the heaviest loss of life in a series of fires that caused 30 deaths in the cold weather months of late last year and early this year.

The cause of the Feb. 1 fire at 1111 Sixth St. NW was officially listed as undetermined.

In a fire a little more than one year ago, on Oct. 22, 1983, two persons were killed and 10 were injured in a fire that destroyed an abandoned Northwest Washington row house in which a number of people were sleeping. That morning the temperature had dipped to 42 degrees, the coldest to that point last fall.