Three people shot to death on the same day last week in the District and Prince George’s County apparently knew one another, according to D.C. Police Chief Peter Newsham, and detectives are investigating the possibility the cases might be linked.

Authorities said they are trying to determine motives for the shootings, which occurred at three different places and times on Dec. 28. Newsham said detectives believe the victims were friends.

Police have arrested a suspect in one of the shootings — a local rapper named Dennis Whitaker who is known as “Jugga Knott.” No suspects have been identified in the other two slayings.

The violence came as 2017 drew to a close, and two of the shootings occurred on the sometimes volatile border shared by the District and Prince George’s County.

It began at about 11:20 a.m., when a man was shot in the parking lot of a 7-Eleven on Eastern Avenue in Northeast. About seven hours later, a man was pushed out of a car one mile away, on Eastern Avenue on the Maryland side of the line. He had been fatally shot. An hour after that, at about 7:20 p.m., a woman was found shot in the trunk of her burned-out Lexus in Southeast.

One of the victims was a custodian in the D.C. school system and had an 8-year-old son. Two others had arrest records that include convictions for illegal guns.

William Sharp, 56, of Hyattsville, said the slain woman was his granddaughter and that she knew the other two victims.

He said he learned the social connection while talking with friends of his granddaughter, Kerrice Lewis, 23, and by scanning her social media posts.

Sharp, in an interview on Thursday, said he had no idea if the killings are connected. All he knew was that Lewis, whom he and his wife had raised since she was 11, “was very excited because she had just finished taking some classes and was looking forward to taking some more.”

Lewis did odd jobs on construction sites and struggled with the loss of her parents — her mother to a brain aneurysm in 2005, her father fatally shot on the front porch of a home in Northwest in 2006 — and had a record that included convictions for an illegal gun and a burglary.

“She made a few bad mistakes,” Sharp said. “She was free-spirited and a lot of fun. . . . She would light up a room, just talking and laughing.”

A spokeswoman for the Prince George’s County Police Department would only address the killing in their jurisdiction. “We have an active investigation,” the spokeswoman said.

The first of the three Dec. 28 victims was shot outside the ­7-Eleven in the 900 block of Eastern Avenue NE. He was identified as Ronzay Green, 23, of Northeast. Whitaker, 23, of Northeast, was arrested three days later and charged with first-degree murder while armed. It was not clear how, or even if, he knew Green. His attorney with the Public Defender Service did not return calls seeking comment.

Police said in an arrest affidavit that Green was shot in the chest and right hand as he walked out of the store. The gunman was identified as the driver of a Mercedes who, according to a witness, yelled at the victim to, “Get out my car.” Just before opening fire, the gunman said, “You think I’m playing, I’ll bust you,” according to the witness’s account in the affidavit.

The witness recognized the gunman from his picture on ­Instagram, police said, and detectives were able to pull up his social media profile as a rapper. Police said Whitaker called police to surrender, telling them “he feared that his family was in danger,” the affidavit states. Whitaker was arrested on Dec. 31.

Hours after Green was shot, the second victim was found. One mile away from the 7-Eleven, at Eastern and Kenilworth avenues in the Capitol Heights neighborhood of Prince George’s County, police said they found Armani Nico Coles, 27, lying on the roadway near I-295. Authorities said he had been shot and pushed out of a vehicle. He died at a hospital.

Police have been unable to determine where Coles was when he was shot. Payroll records show he worked as a custodian for the District’s school system.

Coles’s mother, Amber Coles, said in a Facebook message that she was heartbroken by the loss of her son.

Amber Coles said they had recently went holiday shopping together and talked over dinner about how happy his 8-year-old son was going to be on Christmas.

“He was a very unique and quiet young man,” Amber Coles said of her son. “He loved going to work every day knowing that [there were] things in life his son wanted and he was going to make sure he had it.”

One hour after Coles was shot, police said officers found Lewis in the trunk of her burning Lexus in a rear alley in the 800 block of Adrian Place SE, near Fort Dupont. It is about 1½ miles from the earlier killings along Eastern Avenue. Police said she had been shot several times.

Sharp, her grandfather, said he and his wife took Lewis in after the death of her parents. He said she and Coles had been friends since grade school, but the grandfather had never met Coles. He said he learned after his granddaughter’s death that she had been a social media friend with Green.

Lewis did odd jobs to help him rehabilitate homes, which he did in addition to his job as a service technician. He said he bought her the used Lexus to help her get around and continue with her studies that involved honing her construction skills. He last saw her earlier on Dec. 28.

“She was driving out, I was driving in,” Sharp said. “I don’t know what happened to her.”