A Census Bureau IT supervisor who hatched a failed plot to kill his lover’s husband and make it appear to be a suicide was sentenced Thursday to 23 years in prison.

Odd detail after odd detail in his plot — a fake beard, fake suicide notes, a fake allegation that his victim was having sex with a teenager — emerged during the April trial of Frank Cipriani, 44, of Frederick, who was convicted of attempted murder and use of a gun in a confrontation with the husband in Bethesda in 2011.

Yet another unusual twist came during Cipriani’s sentencing in Montgomery County Circuit Court when prosecutors presented details about a similar case involving Cipriani almost 25 years ago to bolster their argument for a life sentence.

“The best indicator of the future is the past,” said Assistant State’s Attorney Stephen Chaikin, who called Cipriani “cunning” and “dangerous.”

Cipriani’s attorney, Philip Armstrong, countered that life terms should be reserved for “people who actually kill people.”

Frank Cipriani (Courtesy of Montgomery County Police)

Judge Robert Greenberg said that while he was not sentencing Cipriani based on the older case, he did consider that the emotional problems Cipriani showed then had remained unresolved even though Cipriani “was capable of obtaining the help which he needed.”

Cipriani said “I want to continue treatment” and told the judge he was sorry he “scared” the Maryland victim.

Cipriani’s plan for winning back his lover had many chilling and peculiar turns.

As laid out at the trial, the married Cipriani had an affair with a married co-worker for several months in 2011 before she broke it off.

Cipriani then began creating a paper trail that suggested his lover’s husband had been having sex with a teenage girl and that the husband was distraught that the information was about to be exposed. Cipriani pretended to be the girl in an e-mail to report the alleged sex to a children’s advocacy group. Later, Cipriani wrote suicide notes for the husband that mentioned the fictional teenager.

In August 2011, Cipriani posed as a building inspector to lure the husband to a home in Bethesda the man was having renovated. Cipriani left work after swiping and reswiping his building pass in a way that made it appear he was still in his Census Bureau office. He came to the house with the notes and a gun and wore plastic gloves.

Cipriani held the gun to the man’s head and threatened him, testimony showed. But the plan imploded when Cipriani’s fake beard fell off and a painter happened on the scene, giving the victim a chance to run.

Cipriani also fled, leaving behind the beard and notes.

During Thursday’s hearing, Cipriani’s wife said he was “perfectly salvageable,” and relatives said he was a loving father and diligent employee, pleading for leniency as Cipriani cried.

But clinical psychologist Meyer Glantz described the defendant as emotionally stunted.

Glantz told the judge that he did not believe Cipriani intended to “physically harm” his victim, even though he “knew he was going to do a bad thing” when he lured the man to an empty house and held a gun to his head. Had Cipriani meant to kill his victim, Glantz said, he would have devised a “Rube Goldberg, complicated plan” for the shooting — such as how to muffle a shot — in keeping with his obsessive tendencies.

Greenberg was unswayed, saying the notes “put the lie to all of that” speculation about whether Cipriani intended to follow through. Cipriani, said Greenberg, “had engaged in a very long-standing and carefully planned scheme to kill” the victim.

In 1987 in New Jersey, Cipriani was jilted and tracked down the man who was dating his former girlfriend, the victim, Leonardo Ghigliotti, testified Thursday.

Cipriani pointed a gun at Ghigliotti, handcuffed him, forced him into the back seat of Ghigliotti’s vehicle and drove away, Ghigliotti said.

He wriggled his cuffed hands in front of him, Ghigliotti testified, and recalled that he had a bowling ball in his car. He threw the ball at Cipriani, and the car crashed, prosecutors said in court files prepared for the Maryland case.

Cipriani pleaded guilty to criminal restraint and making a threat to kill in New Jersey and was given supervised probation and mental health counseling.