A 23-year-old Montgomery County man killed himself yesterday 16 hours after police said he fired a shotgun blast through the window of a Gaithersburg home, raped one of the occupants, stole a car at gunpoint, and kidnaped a former girlfriend and their 20-month-old baby.

Montgomery County police said Robert Willard Powell Jr. of Merust Lane in Gaithersburg went to a home in the 9200 block of Stewartown Road shortly before 10:30 p.m. Friday to visit his 20-month-old son. The child was in the custody of his mother, Powell's former girlfriend.

Six adults were in the house at the time. Police said some were visitors, but they refused to identify residents or visitors. After he became disorderly, Powell was escorted out of the house by some of the occupants, said police spokesman George Luddington.

Powell returned a short time later and went to the rear of the house, where he fired one shotgun round through a window, police said, then entered the house and tied up the occupants. According to police, Powell then raped one of the women; the victim was not his former girlfriend. He later took keys to a car from another person, kidnaped the baby and forced his former girlfriend to flee with him in the car, police said.

The occupants managed to free themselves, and police were called early yesterday. County police alerted police departments along the East Coast, giving them a description of the car and its occupants.

Shortly after 3 p.m. yesterday, Luddington said, Powell and the hostages returned to the empty house. Minutes later, Luddington said, Powell killed himself with one blast from the shotgun.

Police investigators said they did not know where Powell spent the night and most of yesterday before returning to the house, and they said they were talking with the house's occupants last night. Police said they did not know if Powell had been under the influence of drugs or alcohol.