A dying New Jersey woman identified her identical twin sister as her killer after being knifed in the chest during a fight outside their home, a judge revealed in court on Thursday.

A witness heard Anna Ramirez, 27, say, “Amanda, you stabbed me!” as she lay bleeding on the ground, Camden County Superior Court Judge Edward McBride said, citing the witness’ statement to cops.

The unidentified witness also heard Amanda Ramirez threaten Anna shortly before the stunning intra-family slaying at the Centennial Village Apartments in Camden around 5:40 a.m. Saturday, McBride said.

“Watch what I’ll do!” Amanda allegedly said before going into the building to retrieve a large kitchen knife.

The witness, who lives on an upper floor in the same building as the sisters’ family, heard the threat while watching from a window and went downstairs, arriving outside just after Anna was stabbed, McBride said.

The powerful evidence was revealed during a bail hearing for Amanda, who’s charged with aggravated manslaughter in her twin’s slaying.

Prosecutor Peter Gallagher also handed up a photo of the knife Amanda allegedly plunged into the left side of Anna’s chest.

Authorities haven’t alleged a motive for the deadly attack, which came less than two hours after Anna posted a photo on Facebook that shows both sisters smiling with two friends.

Amanda burst into tears when she entered the courtroom and saw nearly 20 friends and family members, including her mom, sitting in the gallery.

Amanda, who didn’t speak in court, spent most of the session sobbing at the defense table with her face buried in her left shoulder.

Amanda allegedly gave cops conflicting accounts of the incident, including that Anna had lunged at her with the knife.

Defense lawyer Igor Levenberg didn’t challenge probable cause for Amanda’s arrest, but asked that she be released without bail to house arrest with permission to leave for work as a home health aide.

But McBride sided with the prosecution – which said Amanda once skipped a court appearance in a previous, sealed prosecution – and ordered her held without bail.

Amanda’s supporters and her lawyer all declined to comment outside court.