A state judge on Tuesday ordered a new trial for a Queens man who was convicted of taking part in the 1990 killing of a tourist from Utah on a New York subway platform, a crime that provoked a public outcry and became a milestone in the city’s era of high crime and fear.

The man, Johnny Hincapie, broke down in tears and his family cheered when Justice Eduardo Padro announced his decision to throw out the conviction. Hours later, Mr. Hincapie posted bail and walked out of the criminal courthouse in Manhattan after a quarter-century in prison and embraced his parents, while a dozen relatives and friends applauded.

“I feel wonderful, wonderful — I feel free,” Mr. Hincapie said as his family surrounded him.

“It’s sad that it took 25 years for the truth to uncover itself,” he added. “It’s sad that they kept an innocent man in prison for so long because of a false confession that should never have taken place, but I thank God that now I can start to put all of this behind me.”

In his ruling, Justice Padro said he was convinced that new evidence presented during a hearing this year would have changed the outcome of the first trial. Three witnesses came forward and testified that Mr. Hincapie was not on the subway platform when the victim, Brian Watkins, was stabbed while trying to defend his family from muggers.