Stephen Habberstad had known he was gay ever since he was a boy, but he didn’t tell his family or his wife until he was in his 50s.

When he did, it led to a bitter divorce, family conflict and his very own kin ousting him from the family banking business in southeastern Minnesota.

Relatives claimed in a lawsuit that followed that he was fired for business reasons. But Habberstad argued it was because of his sexual orientation.

In a ruling handed down late last month, a Steele County judge agreed, saying, “The truth is: Stephen Habberstad was terminated because he is gay.”

The judge awarded Habberstad as much as $3.5 million, which could be one of the largest payouts in Minnesota to a single person for sexual orientation discrimination, according to his attorney, Leslie Lienemann.

“People can have their own views on sexual orientation. That’s not the issue,” Lienemann said. “The issue is that people have a right to work without that impacting their employment and their ability to earn a living. Discrimination happens even among people who you think are your friends and family who support you. It’s a hard reality for a lot of people.”

Steele County District Judge Joseph Bueltel’s 92-page ruling offers a glimpse into a family feud that simmered for years before boiling over.

In the ruling, Bueltel repeatedly took the family — and sometimes Habberstad — to task for the unhealthy dynamics that swirled among relatives who owned a piece of the Farmers and Merchants State Bank of Blooming Prairie, Citizens State Bank of Hayfield, and their holding company — Country Bankers Inc.

The judge meticulously separated fact from fiction, ruling the family discriminated against Habberstad because of his sexual orientation, retaliated against him for filing a lawsuit and breached its fiduciary duty.

“The shareholders and directors involved in the decision to terminate Stephen Habberstad felt that Stephen, as a gay man, was a liability to the Banks,” he wrote.

Bueltel also questioned the family’s actions, calling some of them — such as a salary study, slashing Habberstad’s job duties and questioning the documentation of the hours he put in — “ham-fisted attempts to obfuscate the truth.”

At the same time, Bueltel ruled that Habberstad must repay a loan from the family’s bank and another from his sister and brother-in-law, Susan and Terry Boschetti.

John Harper III, one of the attorneys representing the family, said his clients maintain that they fired Habberstad for “legitimate business reasons,” not because he’s gay.

“We couldn’t agree more with Mr. Habberstad that you shouldn’t discriminate against anyone because they’re gay or any other reason. And they didn’t,” Harper said.

Meanwhile, Habberstad, who is 61 and lives part-time in Florida, said this week that he’s relieved that the legal fight, which began three years ago when he was cut out of the family’s business, seems to be over.

“It means I can get on with my life,” he said. “I’m still trying to get over this. … It had nothing to do with how our business was run. I was fired for being gay, and it’s just totally wrong. ...

“I didn’t realize my sister harbored those kind of feelings. It really fries me. … I’m the same person today that I was 25 years ago.”

Habberstad and his wife, Kimberly, separated in 2002. Two years later, he told her he was gay. In 2007, Kimberly Habberstad filed for divorce.

According to court documents, Habberstad said his wife told him that she always knew he was gay, “but did not realize it would hurt so much when it was disclosed to her.”

“Many of Kimberly Habberstad’s motives as they relate to this case are based on her resentment and anger associated with Stephen Habberstad being gay,” the judge wrote. The two engaged in a costly, “pitched battle of a divorce.”

As part of the divorce settlement, Stephen Habberstad, who held the majority of shares in the banks, gave his ex-wife a chunk of stock. In so doing, he lost majority control, which allowed his former wife and his sister to take charge.

The judge said Stephen Habberstad was naive in thinking that his sister “would protect him through the divorce and in the corporate boardroom.”

Instead, she and Habberstad’s ex-wife engaged in illegal and bias-motivated decisions and plotted to fire Habberstad because of his sexual orientation, Bueltel wrote.

The judge noted that Habberstad’s sister sent an e-mail to her brother’s children saying, “Your dad has lived a lie for years and years and it has spilled over into the lives of his family causing a lot of heartache.”

Citing family testimony, the judge also noted that Habberstad’s aunt, Phyllis Sieveke, who also is a shareholder, once said that Habberstad “needed to get his act together, get back in the closet and get back to work.”

The judge said he found that testimony credible.

Under the ruling, Habberstad was awarded $798,733 in back pay, $25,000 for emotional distress and at least $100,000 a year during a life expectancy of 21 years. Another 2.5 percent will be added each year to account for inflation, the judge said.

The judge chose annual payments rather than a lump sum, saying he didn’t want the award to financially damage the banks.

He also said he feared Habberstad could “make mischief” if he took a lump sum in stocks, rather than cash, because it could make him a majority owner again, allowing him to retaliate against his family.