Fright
(1971)

According to imdb.com, this is "the first film to come up with the popular horror convention of a lone babysitter terrorized by a psychotic murderer"

Amanda (Susan George) is a college student who has been hired to babysit for the evening by Helen and Jim. Helen is acting strangely. After they leave, we learn that Helen and Jim are "celebrating" Helen's divorce from Brian. When Helen tried to leave Brian, Brian went insane and tried to murder Helen and their son (who Amanda is babysitting). Brian has been committed to an insane asylum. The courts have granted her a divorce from Brian. Helen is fearful that Brian will react badly to the divorce and cause trouble.

Amanda is scared by noises outside the house. It is her boyfriend Chris, who has come to see her. She sends Chris away. Amanda is scared by more noises, and sees a man outside. She tries to call Helen, but the phone line is cut. Suddenly, the door is forced open and Chris's battered bloody body falls in.

Brian shows up, pretending to be a neighbor who heard Amanda scream. At first, Brian is kind and supportive, and Amanda goes to him for protection. Gradually, he becomes creepy and menacing. he begins to call Amanda by Helen's name, and is imagining that Amanda is Helen, who left him.

At the restaurant, Helen is agitated that something is wrong at the house. Helen and Jim run into Dr Cordell, Brian's psychiatrist. To reassure Helen, Dr Cordell calls the asylum, and he is told that Brian broke out when he heard of the divorce. Helen and Jim race to get back to the house, while Dr Cordell goes to the police. At first the police are incompetent and dismiss Dr Cordell's concerns. However, the police get a call that a man got off a bus in town and tried to get a ride to Helen's house. When no one would give him a ride, he strangled a lady and took off in her car. Realizing that there really is a homicidal maniac on the loose, the police head to the house also.

Brian is tormenting poor Amanda. When he thinks she is Helen, he is sweet and gentle, and kisses and caresses her. When he realizes she is not Helen, he is angry and threatening. When the police arrive, Brian says he will kill Amanda and the child if they try to enter. Helen and Jim arrive soon after. Brian says he will free Amanda and the child if Helen comes in the house with him. Helen does so to save her baby. The police give her a canister of knockout gas to open in the house, so Brian will pass out. Brian finds it on her and is enraged. As he tries to kill her, Amanda grabs the baby and tries to leave. Brian chases her and takes the baby. He is outside the house, but as he is holding the baby the police do not want to shoot at him.

Helen goes to Brian and gently asks him to give her their son. Brian does so, imagining she loves him again. As Helen backs away from Brian with the baby, Amanda shoots Brian and he falls dead. (There is no explanation of where she suddenly got this gun, or why the police do nothing.)

Thanks Joseph C!