HERMON, Maine — Daniel Williams, 24, was asleep when someone knocked at the front door of his apartment around 9 a.m. last Thursday. Moments later, he was in a fight for his life, he said Monday.

Williams fired shots from a handgun last week that mortally wounded Robert Dellairo, 30, and injured Philip McIntyre, 19, both of Bangor, after Dellairo and McIntyre broke into his residence at Duran Apartments on Outer Hammond Street, according to Maine State Police.

“They attacked me in my home, and I had to protect myself,” Williams said in a telephone interview over the weekend.

Just before the shooting, Williams answered the door to find a woman he didn’t recognize.

The woman asked to come in because “she said she knew the people that lived there,” Williams said. Williams was suspicious of her claim because he knows all of the apartment’s recent residents and most of their friends, he said, and this woman wasn’t familiar to him.

After a short conversation, Williams told the woman he had to get dressed for work and began to close the door. Before the door latched shut, Williams said, Dellairo and McIntyre came out of hiding somewhere near the entrance and hit the door, forcing it open.

Williams said the force of the two men hitting the door knocked him to the ground. McIntyre came into the room and started throwing punches while Dellairo stood nearby with a knife in hand, he said. Williams said he fought back and that Dellairo entered the fray and took a few swipes with the knife, leaving Williams with a slight cut on his abdomen.

Williams said that during the scuffle with the two men, he managed to force the knife out of Dellairo’s hands.

Luis Ramos, 24, was also in the apartment at the time of the home invasion, state police said. Ramos ran from his bedroom during the fight carrying an electric guitar to use as a weapon, according to Williams, but one of the other men grabbed the guitar and struck Williams in the back of the head.

The two men proceeded to kick and punch Williams and Ramos, but Williams eventually managed to break away and run to his bedroom, where he grabbed his .22-caliber handgun and “did what I had to do,” he said.

Williams said he uses the gun for recreational practice shooting and that it was equipped with a laser sight.

Williams said he shot McIntyre in the leg and followed the injured man and his two accomplices out the door to be sure they were leaving. Once outside the house, Dellairo turned back toward Williams and lunged at him, Williams said. Williams said he “fired off a couple surprised rounds,” striking Delleiro in the hip. That wound would prove to be mortal.

The injured men and woman got into a blue Honda Accord waiting outside. As the vehicle drove away, Williams fired two rounds at the trunk of the car to serve as identifying marks for police, he said.

A female driver took the shooting victims to St. Joseph Hospital in Bangor, where police met the group, according to Lt. Christopher Coleman of the state police Major Crimes Unit. At the hospital, the vehicle appeared to have two bullet holes just below the rear license plate.

Dellairo was transferred to Eastern Maine Medical Center, where he died Thursday afternoon.

The car that took the men to the hospital is registered to Danielle Bellefleur of Bangor. Williams said the woman who knocked on the door and asked to be let in before the home invasion told him her name was Danielle.

Investigators are trying to determine the motive for the home invasion and exactly what drew Dellairo, McIntyre and the woman to Duran Apartments. State police have said Williams and Ramos did not know any of the three people who entered their apartment.

Police are investigating the role of a second woman who was with McIntyre and Dellairo at the time of the home invasion, according to state police spokesman Stephen McCausland.

Williams said Monday that he believes a former high school classmate who was in the car during the home invasion led the other three individuals to Duran Apartments.

”I honestly don’t know her that well; she’s just an acquaintance,” Williams said, adding that he ran into the woman and had a brief conversation a few weeks ago at an event in a club and that she was aware of the fact that he works as a contractor and owns an event-organizing business.

Williams said his apparent business success could have led the woman to believe there were things of value in his home.

Police have not released or confirmed the identities of the two women they’re interviewing in connection with the case. Neither woman has been charged.

“We are still investigating [the] incident and are not in a position yet to comment on the involvement of the other parties,” Coleman said via email on Monday.

The woman Williams said he believes led the other three individuals to his apartment has appeared in the Bangor Daily News after drug-related arrests and has been listed in court records multiple times facing charges related to operating a vehicle with a suspended license.

Dellairo had several convictions on his record, according to the Bangor Daily News archives. He was convicted of carrying a concealed weapon, driving to endanger and criminal mischief in separate 2011 incidents. He was convicted in October 2010 of assault, violating his conditions of release and burglary.

In May 2006, Dellairo and Bellefleur, his then-girlfriend, each were indicted on one count of burglary by the Penobscot County grand jury.

The indictments stemmed from the Brewer Police Department’s March 2006 search of a room at a Holyoke Street boarding house that Dellairo and Bellefleur were living in. The search, and a subsequent search of their car, reportedly led to the discovery of a stolen credit card and thousands of dollars’ worth of stolen property, including electronics.

McIntyre was treated at St. Joseph Hospital on Thursday. After his release from the hospital, he was charged with burglary and taken to the Penobscot County Jail. He was released on bail later that same day.

In August 2010, McIntyre, whose address was listed as Corinth, was fined $400 for assault, according to the archives. In 2011, he was fined $300 for theft by unauthorized taking and later that year was sentenced to 48 hours in jail for carrying a concealed weapon.

Williams said he acted out of self-preservation, but that doesn’t mean it’s easy to accept the end results of that morning’s home invasion.

“I’m very banged up about it,” he said. “I’ve shed a lot of tears behind closed doors for Bobby Dellairo and his family.”