ALAMEDA, Calif. (AP) _ A mother and her three children were shot to death in their home by a family friend who reloaded his pistol two or three times before fatally shooting himself, police said Thursday.

A 16-year-old cousin of the Tran family escaped through a second-story window after a shot was fired at her and called police late Wednesday night, Alameda Police Detective Forest Taylor said.

''She told officers she heard shots fired and children screaming as the shots were fired,'' Taylor said.

The gunman, identified as Nga Huynh, 43, had known the family for at least four years and had been staying in an upstairs bedroom for a few months, Taylor said.

The cousin who escaped told police that everything seemed normal when Huynh returned to the apartment and the mother made him dinner, Taylor said.

''He said he had something important he wanted to tell everyone. The mother wanted to know if it was important enough to wake the children up.''

The cousin, who was walking from the bathroom, then saw the man brandish the handgun, Taylor said.

''He took a gun out and she started running. He fired a shot and she went out the bedroom window,'' the detective said. ''She ran to a neighbor's apartment, banged on the door and then notified us. When we arrived there, everything was over.''

The man reloaded his weapon before shooting himself with a five-shot .38- caliber revolver, Taylor said.

''We figure he reloaded two to three times,'' the detective said.

Huynh's body was found in his bedroom, with the pistol on the floor beside him, Taylor said.

Mai Tran, 38, was found dead outside her children's bedroom. Inside, Lien Tran, 14, Lan Tran, 12, and a 9-year-old son, Quoc Tran, were found shot to death, Taylor said.

No motive has been determined in the slayings, he said.

The slain woman's husband, who works at an Oakland hospital, was not at home when the shooting occurred at 10:30 p.m., the detective said.