Two men accused of stabbing an off-duty NYPD detective pleaded not guilty in court Wednesday.

D’Angelo Rafael Jean Caraballo, 25, and Sneider Mejia Bautista, 24, are facing several charges, including attempted murder in connection with the brutal attack on Det. Jose Mercedes on Oct. 2 on East 206th Street and Rochambeau Avenue in the Bronx.

Prosecutors allege Mejia approached Mercedes and brandished a knife. Caraballo, they allege, then got off a scooter and ripped two chains from Mercedes’ neck.

Mejia is accused of stabbing Mercedes 10 times.

Prosecutors told the judge Mercedes identified himself as an NYPD detective six times during the attack.

Mercedes spoke about the harrowing ordeal on Tuesday afternoon.

“I was on vacation, I was on my day off, and I was not expecting this,” he said. “It was a very, very scary sight to me. I’ve been investigating crime for a long time, and at this time, I just wanted to enjoy my vacation, my time off. I wasn’t expecting this.”

Mercedes said he identified himself in both English and Spanish to the men.

“I thought I was going to die,” he said.

Prosecutors allege in the days after the attack, the men tried to evade capture by not using their phones and by cutting their hair “in an attempt to disguise themselves.”

Caraballo and Bautista were arrested in Massachusetts, where they were found hiding in the basement of a house, police said. They were extradited to New York to face criminal charges.

Defense attorneys for both men didn’t say much Wednesday, other than they were waiting to file a bail application.

“I’m going to reserve my bail application until I have a chance to interview his family, who is here in court, and get a better picture of his life,” an attorney for Caraballo said.

Members of Mejia’s family sat in the courtroom but said nothing to reporters.

Both were remanded and will be back in court in early December.

The Department of Homeland Security said both men are from the Dominican Republic and are living in the United States illegally.

More from CBS News