Inmate Troy Cochran, who is sentenced to 40 years, married his childhood friend, Bronx resident Lashawn Cochran, in prison.

These inmates are adding a ball and chain — and they’re happy about it.

Convicts without commitment phobias have tied the knot 1,643 times in 44 state prisons in the last six years, according to Corrections Department records.

Love is most in the air at max-security Green Haven Correctional Facility in Stormville, home to about 2,200 prisoners, where wedding bells rang 145 times.

There were 144 Happily Ever Afters at Auburn Correctional outside Syracuse, almost always in the presence of Raymond Lockwood Jr. or his son Raymond Lockwood III, dairy farmers who officiate weddings at the prison. Lockwood III succeeded his father as an Aurelius town justice.

“I got a call a million years ago asking me if I would be available to do a wedding at the facility, and I had to think a long time about it, and I said ‘Well I guess,'” the elder Lockwood, 73, recalled of his first Auburn gig 30 years ago. “I thought it was maybe a prank call.”

He went on to perform hundreds of weddings — which pays $100 a pop — inside the state prison system, including some that made history.

He officiated the state’s first gay prison wedding in December 2011, between inmate Ronald Cook, 31, and ex-prisoner Marc Rodriguez, 34, who met while doing time at Auburn.

Long before notorious lifetime convict, Beltway Sniper Lee Boyd Malvo, 35, married a woman earlier this month in a Virginia prison, Lockwood oversaw the nuptials of New York’s first “lifer,” convicted child rapist and killer James Moore. The 84-year-old married former prison volunteer Joyce Smith-Moore in 1989, the year the state began allowing inmates serving life sentences to tie the knot.

Lockwood said women travel far and wide to get hitched to their felon-fiancés, noting he’s had brides from Puerto Rico to California.

He and his son have a matter-of-fact approach to the unlikely side hustle.

“You follow the rules. You go in and do it, and you leave, you don’t make memories in a prison I guess,” said Lockwood III, 52, who inherited the role when he took over as town justice from dad.

Weddings at Auburn are held in the back of the visitation room, which resembles a school cafeteria, starting at 10 a.m. The bride makes the arrangements with the prison, they set the date and the deed is done in about 30 minutes. Two witnesses must be present.

Lockwood Jr. said drama is rare — except when an inmate refuses to come down from his cell or the bride doesn’t show. “I have sometimes seen a mother who didn’t look very happy, but no one has never raised an issue,” he said.

Inmates often leave with a ring on their finger, as long as the hardware is cleared with the prison ahead of time.

Most wedding dresses don’t fit prison-attire guidelines — so the lucky ladies wear jeans and a T-shirt or a modest dress. There are no flowers, no cake or string quartet, but there’s always emotion, they said.

“Sometimes they write their own vows and their mothers, fathers, kids are there,” Lockwood Jr. said, noting he’s seen tears of joy. The ceremonies almost always end with the words, “You may kiss the bride.”

Just like life on the “outside,” couples on the “inside” meet in a variety of ways. Sometimes they find love on prisoner pen pal sites where lonely jailbirds put out open calls for romance. Others meet inmates when they join friends on trips to the prisons to visit their incarcerated significant others.

Others, like Lee McLeod, 37, reconnect with old flames.

McLeod was dating his high school sweetheart, Casandra, now 33, when he was arrested in 2003 at 20 years old for shooting and killing a fellow Peekskill man after a dispute in a park.

Not wanting to burden either of them with “extra stress,” McLeod “pushed her away,” until two years later when he began to “miss her.” He assigned his cousin to deliver the message, and the next weekend, Casandra came to visit.

On Oct. 9, 2006, they were married at Upstate Correctional Facility in Franklin County, where McLeod was beginning his 25-year sentence.

Eleven years later, they conceived a son during a weekend conjugal visit in one of the “trailers” at Green Haven Correctional Facility.

“For the first time in over two years, I got to do what a male and female do, and not just that but even just being around a female for an extended period of time. I was nervous,” he said about their first weekend together.

McLeod, now 37 and a hotel maintenance worker, was released in December 2018 — in part for good behavior he credits to his wife and son, now 2 years old.

“I was gang banging in the streets and in prison, but once we decided to get married, I let that go, because I felt like I had family support from the outside that cares about me making it home,” McLeod said.

Bronx resident Lashawn Forman, 36, also found love with her childhood friend from Harlem, Troy Cochran, after he was arrested on second-degree murder charges in the late 90s. He was sentenced in 2000 to 40 years to life.

Lockwood Jr. married the pair in matching red outfits in 2018.

“It’s like what makes him different from anyone else? Because he’s in prison? Just because you’re free doesn’t mean he can give me what [Troy] can give me. I’m not fancy. The thing I want is love and loyalty, and I got that,” Forman explained.

The next step in their relationship, are conjugal visits. Then they have a parole hearing to look forward to in 2038, she said.

“We’ve done 25 already,” Forman reasoned. “So another 18 is pretty much nothing.”