Kevin Dugar, left, and twin brother Karl Smith. Already serving a long prison sentence, Smith took the witness stand Sept. 22, 2016, and professed he committed a murder for which Dugar was convicted years ago. (Illinois Department of Corrections).

It was the first time in years that the 38-year-old identical twin brothers had seen each other.

Their mother wept as she looked on.

But this was no typical family reunion.

Karl Smith was on the witness stand Thursday at the Leighton Criminal Court Building, making an admission seemingly ripped from a made-for-TV movie.

Smith confessed to a murder that his brother, Kevin Dugar, has been in custody for since 2003.

"I'm here to confess to a crime I committed that he was wrongly accused of," Smith testified moments after taking the witness stand.

His mother, Judy Dugar, cried as she listened from the courtroom gallery, while his brother, sitting at a table with his lawyer, wiped tears from his eyes.

But Cook County prosecutors questioned the stunning admission, telling a judge that Smith came forward only after an appeals court upheld his own conviction for attempted murder. He is serving a 99-year prison sentence for taking part in a home invasion and armed robbery in which a 6-year-old boy was shot in the head in 2008.

"He's got nothing to lose" by taking the blame for his brother's murder rap, said Assistant State's Attorney Carol Rogala.

She also told Judge Vincent Gaughan that Smith's confession didn't "fit the independent eyewitness accounts of what happened."

It is unclear when Gaughan will decide if Dugar should be given a new trial.

Dugar's lawyer, Karen Daniel, a Northwestern University law school professor who directs its Center on Wrongful Convictions, said the evidence against Dugar was razor-thin — no confession or physical evidence but the testimony of two eyewitnesses, including one who recanted at trial.

The two brothers, who dressed alike until eighth grade and impersonated each other for years afterward, still looked identical Thursday with their shaved heads and close-cropped beards. Only their clashing prison clothes set them apart. Smith is doing his time at Menard Correctional Center; Dugar at Stateville Correctional Center.

Growing up, the twins were closer than brothers — they were "one person" who shared socks, shoes and even sandwiches, according to their mother and Smith.

Even their parents couldn't always tell the brothers apart, and on Thursday, Smith struggled to identify himself when shown a photo of the two of them.

Their mother, whose maiden name Smith later adopted, spent much of the day in tears, happy to be in the same room as both of her sons for the first time in years, even if it was a courtroom. She doesn't drive and hasn't visited them in state prison.

But she said she was hurt that prosecutors doubted her son's story that he was the real killer.

"He wouldn't lie about that," she said.

Veteran lawyers at Cook County's main criminal courthouse could not recall another case quite like this one — a scenario some said seemed more out of a law school exercise.

But Michael Winston was released from prison in 2012 after six years behind bars for a South Side murder after his older brother, Robert, who looked similar, confessed that he was the actual killer, said Winston's attorney, Jeffrey Urdangen.

And in New Mexico, shortly after Joseph Montoya was convicted of second-degree murder in 2000, his identical brother, Jeremy, came forward to claim he was the actual killer. But the trial judge and appeals courts rejected the claim, finding the twins had "colluded," according to court records.

In the slaying at issue in Thursday's hearing, a gunman dressed in black shot into a group of three people near Sheridan Road and Argyle Street in March 2003, killing Antwan Carter and wounding Ronnie Bolden.

Bolden, who was shot three times, later identified the gunman as "Twin," the street name used by Smith and Dugar, who frequently impersonated each other.

"We was acting as one," testified Smith, who admitted he and his brother were gang members who dealt drugs. "Where I was, he was, acting like each other. He pretended to be me, and I pretended to be him."

Smith told the judge he was stopped by police not long after the killing but identified himself as his brother and was allowed to leave.

At trial, Bolden admitted that he didn't identify Dugar as the gunman for more than a month after the shooting because he planned to settle the matter "on the street," according to Dugar's petition for the post-conviction hearing. Bolden was a member of Black P Stones, a gang then feuding with the twins' gang, the Conservative Vice Lords.

Bolden identified Dugar in a photo lineup that did not include Smith, according to the petition. The other eyewitness, Monique Boykins, who was 16 at the time of the shooting, recanted at trial and testified Bolden told her to identify Dugar as the gunman to police.

A jury convicted Dugar of first-degree murder in 2005, and Judge Gaughan sentenced him to 54 years in prison.

Daniel maintains that Smith's confession is newly discovered evidence that Dugar's trial attorney could not have uncovered.

Dugar had asked his brother if he had been the gunman before the trial, Smith testified Thursday, but he said he denied it at the time.

Smith said he never told anyone he committed the homicide until he wrote his brother a letter three years ago.

"I have to get it off my chest before it kills me," Smith wrote in tiny handwriting to fit as much as he could on each page. "So I'll just come clean and pray you can forgive me. … I'm the one who and shot and killed those two Black Stones on Sheridan that night."

When Smith didn't hear back from his brother, he wrote him again a few weeks later in October 2013, confessing to the murder again and asking for his brother's forgiveness.

"The reason I didn't say (expletive) at the time was because I didn't and couldn't find the strength to do so at the time," Smith said in the letter, admitted into evidence.

This time, Dugar wrote back and asked Smith to contact his lawyers. Smith signed a sworn statement confessing to the murder in 2014.

On Thursday, Smith testified that he threw a party the night of the murder but decided to leave with a close friend to buy marijuana.

After parking at Sheridan and Argyle, Smith was crossing the street when a truck pulled up and he was confronted by Bolden and Carter, he testified.

Smith said he opened fire with a .38-caliber handgun, saw Carter fall to the ground and then pulled out his .32-caliber pistol and fired at Bolden as he backed up, Smith testified. He said he then ran back to the friend's car.

"I took a deep breath and told him to … just drive and go to the liquor store," Smith said.

They then returned to the party, where Smith changed clothes and later went clubbing with his brother, he said.

After his brother's arrest, Smith said he didn't come forward because he thought his brother would be cleared of the killing. He even sat in on at least one day of the trial, taking a seat in the back of the courtroom.

"I didn't have the strength to come forward," Smith said. "I thought it was the job of the police to catch me."

He testified he found God in prison and realized he needed to set his past wrongs right.

But prosecutors questioned his sincerity. Police repeatedly asked Smith to come in for questioning but he never did, they said.

"You never gave witnesses in this case the chance to see you together to pick out the right one, correct?" Rogala asked.

"Correct," Smith replied.

The twins' father, Isaiah Dugar, 68, died last month from a heart attack, an ending their mother said was quickened by the pain of seeing both their sons behind bars for violent crimes. The couple also had two daughters.

"I hope Kevin will get out. I hope he change his whole life around," said the mother, crying in the courthouse lobby. "He got to."