A Manhattan man has spent nearly all of the past seven years locked up on Rikers Island awaiting trial — a dubious record for pretrial incarceration that is not likely to end anytime soon, experts told The Post.

Carlos Montero, now 24, was with two pals when one fatally stabbed a man and the other slashed another during a robbery in Washington Heights on Oct. 23, 2008, authorities have charged.

Montero, who has spent six years and eight months in Rikers, attempted to get his case tried separately — while one of his alleged cohorts fights the DNA evidence — but the judge balked, and his lawyer won’t even seek bail for him now because he says it’s a lost cause.

“I’m depressed in here. I just want to go home,’’ said Montero, who entered the jail at age 17.

The state statute that is supposed to guarantee a prisoner’s right to a speedy trial — within 180 days — doesn’t apply to murder cases.

There also is a right to a reasonably rapid proceeding under the Sixth Amendment, but the US Constitution doesn’t lay out a timeline.

So Montero is still waiting for his day in court, even after 77 appearances in Manhattan Supreme Court before Justice Ronald Zweibel — and 2,423 days behind bars.

Montero said he was aware of the recent suicide of Kalief Browder, a Bronx teen who was locked up on Rikers for three years while he awaited trial.

Browder was eventually cleared, but his lawyer said the abuse that the teen suffered at Rikers led to his June 6 suicide.

Montero said that while his situation has left him despondent, too, “I don’t think about killing myself because I love myself.”

“I still think I can get justice,” he said.

Montero’s case seems tailor-made to challenge the law, said famed civil rights lawyer Ron Kuby, who is not connected to the case.

“This case is gold medal-winning when it comes to delay,” Kuby said. “The longest period of time I’ve heard of is about five years in New York state.”

“It seems a very clear constitutional violation to hold somebody for nearly seven years in pretrial detention without trial,” he said.

The delay also has been a costly hit to taxpayers.

According to the city’s Independent Budget Office, the cost of housing one inmate in the city in 2012 was $167,731.

That means Montero’s seven-year jail stint has already cost the city more than $1 million.

Montero was allegedly with buddies Jairo Peralta and Diangelo Enriquez when they demanded that victim Brian Maldonado hand over his jacket near 187th Street and Audubon Avenue.

Peralta fatally stabbed Maldonado as he took off his coat, while Enriquez slashed another man who tried to flee, according to court papers.

Montero insists that he wasn’t even there that day, despite witnesses who placed him at the scene of the crime.

“I don’t have the heart to kill someone,’’ he said. “I wasn’t there. I know I could sue, but no amount of money could get me justice for this. I just want my freedom.”

Montero said prosecutors offered him a plea deal of 15 years behind bars, but he refused, maintaining his innocence.

The city Department of Corrections doesn’t keep records on pretrial incarceration time, but Kuby and other lawyers said Montero’s time behind bars could be a state record.

Kuby said Montero’s lawyers can try to fight for his freedom while his case comes to trial.

But Montero’s lawyer, Robert Jaffe, said he has already moved to separate his client’s case from the other two suspects’ but was denied.

Jaffe said the bulk of the delay was caused by Enriquez’s fight over DNA evidence, an issue that doesn’t affect Montero.

He, too, called it “totally unfair.”

“The massive delay should not have happened,” Jaffe said.

Jaffe, who was appointed by the court, added that he never asked the judge for bail because “there’s no point.”

“Because it’s a murder case, he isn’t getting bail,” he said.