WARSAW, Poland (AP) _ A mob of about 100 hooligans attacked a Gypsy neighborhood in a northern town, beating two men and destroying nine homes, newspapers reported today.

The rampage occurred Wednesday night after a car driven by an 18-year-old Soviet Gypsy struck two pedestrians, injuring one critically, police said.

The driver surrendered to police but that did not stop the attack in the town of Mlawa, 65 miles north of Warsaw, the newspapers Gazeta Wyborcza and Zycie Warszawy reported.

They said Gypsy families fled the mob in their cars and sought refuge at the local police station and in a nearby forest.

Police detained four 16- to 18-year-old youths they said led the mob, Gazeta Wyborcza reported.

Police had to use tear gas to stop another crowd from marching on the neighborhood on Thursday night, it said. Two more arrests were made then, and three police cars were damaged.

An unidentified police officer in the provincial seat of Ciechanow said extra police patrols remained in Mlawa today.

Poland has an estimated 10,000 to 15,000 Gypsies, many of whom live in the rural, relatively poor area around Mlawa.

The attack points up the ethnic strains that have accompanied democratic revolutions across eastern Europe.

Although Poland is relatively homogeneous, there have been anti-Semitic incidents as well as tension involving the growing Gypsy population, which includes immigrants from Romania and Bulgaria.

''The most painful thing is that a group of respected citizens of our town living in the neighborhood did not intervene,'' Mlawa police Superintendent Zdzislaw Siniarski told the Zycie Warszawy newspaper. ''I could see no horror among them, or any attempt to help.''