The white Texas police officer who gunned down a black woman as she played video games with her 8-year-old nephew inside her home resigned Monday — and could face criminal charges, officials said.

Fort Worth cop Aaron Dean was going to be fired Monday morning over the fatal shooting of Atatiana Jefferson but turned in his resignation before he could be canned, interim Police Chief Ed Kraus told reporters at a news conference.

“Had the officer not resigned, I would have fired him for violations for several policies, including our use-of-force policy, our de-escalation policy and unprofessional conduct,” Kraus said.

Dean, who joined the department in 2017, could face criminal charges and an FBI probe for possible civil rights violations, Kraus said.

The now-former cop gunned down Jefferson, 28, early Saturday as she approached her bedroom window.

The shooting came after a neighbor called to report that Jefferson’s front and side door were ajar and requested a welfare check.

Dean didn’t identify himself as a police officer before firing from the fenced-off backyard, police said.

There was no sign that officers knocked on the front door, either, Kraus said.

In bodycam footage, the officer is heard yelling quickly, “Put your hands up, show me your hands.”

The sound of gunfire immediately follows.

“Perceiving a threat, the officer drew his duty weapon and fired one shot, striking the person,” police have said.

Jefferson family lawyer Lee Merritt said the victim had heard sounds coming from the backyard and approached the window to investigate when she was shot.

Fort Worth Mayor Betsy Price said an independent panel of experts would review the incident.

“As a mother, a grandmother, a sister, an aunt, I can’t imagine anything worse, and I’m so sorry,” Price said.

Earlier Monday, the victim’s family members called for an independent probe and the arrest and prosecution of the officer involved.

Jefferson’s older sister, Ashley Carr, said Atatiana was just enjoying life at home, “where no one would have expected her life to be in harm’s way.

“Especially not at the hands of a civil servant who had taken the oath to serve and protect,” she said.

With Post wires