Enraged to learn his small dog had been fatally hit by a car while in his roommate’s care, a 68-year-old computer scientist struck the woman repeatedly in the head with a hammer in their Montgomery County apartment, law enforcement officials said.

The man later dragged the roommate out of the apartment, along with her sleeping bag and cat. Arriving medics took her to a hospital, and she was treated for a depressed skull fracture, according to records.

The computer scientist, Timothy Oliver, is due in court Aug. 29 to face charges of attempted first-degree murder and first-degree assault. He was jailed for two days this month after his arrest, then was released on bond, jail officials said Saturday.

In an affidavit filed in Montgomery County District Court giving reasons for the charges against Oliver, detectives describe a chaotic sequence of events in the apartment in the Rockville/North Bethesda area.

The episode began on the night of Aug. 4 and continued into the morning of Aug. 5. At least one detail could be helpful to Oliver: After the alleged attack, the victim remained in the apartment for at least an hour before being ejected, suggesting Oliver halted the alleged attack on his own.

Timothy Oliver, an NIH computer scientist, was charged with using a hammer to attack a roommate. He became upset after she took his dog for a walk and the dog was killed by a car. (Courtesy of Montgomery County Police)

Police listed the victim as being in stable condition Saturday. Oliver did not respond to messages seeking comment. Online records do not show whether he has retained an attorney.

He is a computer scientist at the National Institutes of Health’s Center for Information Technology, according to NIH and police officials.

About the time Oliver left work Aug. 4, he received a series of phone calls from his roommate, who had moved in about a month before. She said she had been walking the dog, apparently a Maltese-poodle mix, when it broke free and was hit by a car, according to court records. The roommate told Oliver that she was taking the dog to an emergency animal clinic near the apartment.

Around this time, the roommate also spoke to a neighbor about the badly injured dog and Oliver’s possible reaction. “He’s going to kill me,” she kept telling her neighbor, according to detectives.

Oliver met the roommate at the clinic, but it was too late. “Attempts to revive the dog were unsuccessful,” the affidavit states.

Later that night, Oliver and his roommate started talking about the dog and how it got hit by the car. Oliver began pacing. The roommate went to the small bedroom where she slept. Oliver, according to police, then retrieved a hammer from a tool box in the kitchen. He attacked his roommate while she was standing, striking her several times in the head, according to the affidavit.

Oliver told her to leave the apartment, but she said she had nowhere to go.

Eventually, the roommate and the cat were forced out, along with the sleeping bag, authorities said.

It was unclear exactly how much time passed between the conversation about the dog and the alleged attack, then between the attack and the eviction.

The victim later told detectives that for a time she blacked out.

It wasn’t until 6:36 a.m., Aug. 5, that police were called to the scene. They found medics had just gotten there and were treating the victim, whose head was covered with dried blood. The officers approached the apartment, where they saw blood and a sleeping bag on the ground, and a man standing in the doorway.

“Oliver was not immediately responsive to the officers’ questions,” detectives wrote, “and a quick search of the apartment discovered additional pools of blood on the carpet.”

Get updates on your area delivered via e-mail