A Devon man faces murder charges in the fatal shooting of his ex-wife with an AR-15 style rifle in the Radnor Wawa, where they were to exchange custody of their young son, authorities said Friday.

Brian Kennedy, 34, was charged with criminal homicide, first-degree murder, third-degree murder, and related crimes in the death of Stephanie Miller.

Court records show that Kennedy had a confrontation with Miller at the same Wawa three years ago that led to a conviction for harassment.

According to police, Kennedy was supposed to bring his son to the Wawa at Morris and Sugartown Roads on Thursday to return the boy to his mother. He did not bring the child, officials said. Instead, as witnesses watched, he walked into the store with a rifle and shot Miller in the head and stomach at point-blank range about 8:20 p.m. before fleeing in a black BMW sedan.

Miller, 37, was pronounced dead at the scene.

Officials did not say where the boy was at the time of the shooting.

A witness flagged down a passing patrol car to report the shooting just as frantic calls came in to 911 about it.

Police found Kennedy and the rifle in his BMW at Thornbury Park in Glen Mills about 11 p.m. and took him into custody, officials said. At the time of his arrest, investigators said, Kennedy looked to be suffering from a drug overdose. He was taken to a local hospital and remains in what officials called a deep sleep.

Investigators were seeking to determine if Kennedy owned the Del-Ton DTI-15 rifle legally.

“I want everyone to know what a coward he is,” Radnor Police Superintendent Christopher B. Flanagan said in an interview.

Delaware County District Attorney Katayoun Copeland said Miller had been granted a protection from abuse order against Kennedy, but it expired in September. She chose not to renew it.

“Does it stop an individual from killing you? It doesn’t,” Copeland said of a PFA. “There is now a child who is motherless.”

Three years ago, in the checkout line at the same Wawa, Kennedy had threatened to kill his ex-wife during a child custody exchange, according to Delaware County court documents.

“Get that [expletive] life insurance policy before I kill you,” Kennedy whispered in Miller’s ear as she waited to buy items for their then-3-year-old son, the court documents said.

She yelled “excuse me” in an attempt to draw attention to herself, she told police.

Miller went to the police to report the incident the next day, after working a night shift, and Kennedy was charged with terroristic threats and harassment.

At a preliminary hearing, she told a judge what had happened during their 7:30 p.m. exchange, saying she was “very fearful” of Kennedy.

After threatening her, Kennedy “just kind of stormed out,” she said, according to a transcript of the hearing, “so I didn’t get to say goodbye [to my son] or give him a hug or kiss or anything.”

When asked by Kennedy’s attorney why she allowed her son to spend several days with her ex-husband after the threat, Miller said his anger was directed at her and her alone.

“I feel that he’s safe and fine with our son, but he’s just been very upset with me since our divorce,” she told the judge. “The last three years have been very difficult.”

Wawa said the store will remain closed until further notice. Wawa security officials were assisting police in the investigation.

“We are deeply heartbroken by this tragedy,” Lori Bruce, a company spokesperson said in a statement. “The safety of our associates, customers and communities is always at the forefront of everything we do.”

Kennedy lived at Stonegate at Devon, a sprawling apartment complex off Sugartown Road, just a few blocks away from the Wawa he stormed Thursday night. No one answered the door at his apartment on Friday. Neighbors said they didn’t really know him.

Miller, neighbors said, was the doting mother of a happy child. She worked as an occupational therapist and would occasionally take her son to her parents’ home in Tredyffrin Township for babysitting.

She and the child lived nearby in a Berwyn apartment. Milann Dittman saw them there some mornings as the boy headed off to school with his backpack and Miller headed to work in scrubs.

“She was just so nice,” he said. “She seemed like a great mom. He seemed like a happy little guy. Now, he’s without parents.”