A South Philadelphia electrical contractor and longtime ally of labor leader John J. Dougherty is headed back to prison, roughly a decade after serving a two-year sentence for similar crimes.

On Wednesday, a federal judge sentenced Donald “Gus” Dougherty, 55, to two years again, signing off on a deal struck with prosecutors to secure his guilty plea to new charges of tax fraud and theft from a union benefit fund.

“My intentions were never to break any laws,” Dougherty told U.S. District Judge Michael Baylson. “If I did break them, I apologize for bringing everyone back to this room.”

Though Gus Dougherty and John Dougherty are not related, the two men’s fates both in and out of the legal system have been intertwined for decades.

As the owner of Dougherty Electric Inc., one of the largest union electrical contractors in the city, Gus Dougherty has brought hundreds of jobs to Local 98 of the International Brotherhood of Electrical Workers over the years. And as the head of that union, John Dougherty, better known by his nickname “Johnny Doc,” has in turn paid Gus Dougherty’s company hundreds of thousands in “market recovery funds” — payments meant to offset the higher cost of employing union labor.

During Gus Dougherty’s first case in 2008, he admitted to failing to pay more than $1 million in required benefits payments to a Local 98 health and welfare fund, evading $2.6 million in taxes and providing John Dougherty more than $115,000 worth of free home renovations.

Prosecutors had hoped to persuade Gus Dougherty to testify against the labor leader in that case. He refused, and John Dougherty was never charged. He has consistently maintained he had no knowledge of the contractor’s intent to do the work on his home for free.

And when John Dougherty’s union kept the “market recovery” money flowing to Dougherty’s electrical business after his release from prison, prosecutors objected to those payments, saying they appeared to be an attempt to help him pay his restitution debts from the coffers of the same union he was accused of defrauding.

Neither man managed to shake the FBI’s interest in them in the decade that followed. And in 2019, John Dougherty was indicted in an unrelated case connected to bribes he is accused of paying City Councilmember Bobby Henon and $600,000 prosecutors say he and six other members of his inner circle embezzled from Local 98′s coffers — charges he has vowed to fight at trial.

Within a year, Gus Dougherty found himself facing a federal judge again, too, on the charges that led to the prison sentence he received Wednesday.

Gus Dougherty admitted in January that he had spent hundreds of thousands of dollars from his company’s accounts to pay for vacations in Miami, beer delivery, home repairs, and homeowners’ association fees for his wife’s condo in New Jersey.

In 2015 alone, he racked up $237,000 in personal expenses on his company’s dime that he failed to report as income to the IRS.

At the same time, he failed to pay $266,000 he owed in health and welfare fund benefits required under a collective bargaining agreement with the IBEW local in Pittsburgh for a hotel and condo project his company had been contracted to perform there. Prosecutors say he skirted the requirement by using nonunion laborers and hiding their presence on the job by paying them through a company owned by his brother.

But at his sentencing Wednesday, Dougherty’s lawyer, Eric W. Sitarchuk, maintained that while his client’s crimes were serious, they were a small aberration when judged against the significant benefit he and his company have provided union electricians in the form of high-paying, steady jobs.

“Since the last case,” the lawyer said, “he has made a commitment to employing union workers and paid them almost $100 million in salaries and benefits in the last decade alone.”

Baylson seemed to struggle with the two-year prison term prosecutors and the electrician had agreed upon since this was the second time he’d committed similar crimes. The judge did, however, sign off on the deal with one new wrinkle — an order that Dougherty pay a $125,000 fine in addition to the restitution he owed to the IBEW local in Pittsburgh and the IRS.

“This is a second offense,” he said. “It’s slightly different, but it’s still the same [conduct]. I feel that the financial penalty should be punitive.”