Decades before President Trump nominated him to be labor secretary, Andrew Puzder went to battle with federal labor regulators in a Las Vegas courtroom.

The year was 1983, and Mr. Puzder was working at a law firm owned by a famous mob lawyer and casino owner whom the Labor Department accused of squandering $25 million from his union workers’ pension funds on sham investments.

It fell to Mr. Puzder to lead the defense, which he framed in aggressively antigovernment terms. In his opening statement, Mr. Puzder told the jury it was not his boss’s fault for not paying back the money — it was overzealous regulators in Washington who had killed off a good business deal by intervening before his investments could succeed, he said.

“We should not be required to pay for the mistakes of the Department of Labor” and the union, Mr. Puzder said, according to The Las Vegas Review-Journal.

The jury did not buy it. Mr. Puzder’s boss, Morris A. Shenker, was hit with a $34 million judgment and filed for bankruptcy.

More than three decades later, the lawyers who represented the Labor Department in the case recall Mr. Puzder as bright and capable, but they still marvel that he blamed government regulators.

“I personally find there is some irony in him being nominated to be the secretary of labor,” said Daly D. E. Temchine, the lead lawyer in the case for the Department of Labor. “Back then, he represented a guy who thought it was O.K. to screw his employees.”

As it turned out, Mr. Puzder’s arguments in the case foreshadowed positions he would take after leaving the practice of law to become chief executive of a fast-food company. He has repeatedly argued that labor regulations stifle economic growth. He has indicated his preference for machines over people because they do not take time off or file lawsuits. And a recording recently surfaced of him referring to his employees as “the best of the worst.”

Because he was a lawyer representing a client, the positions that Mr. Puzder took in the case do not necessarily represent his personal views. But Mr. Shenker was more than just a client: He was also Mr. Puzder’s first boss, one he chose to work for, an associate said, specifically because it gave him the chance to litigate this case and a second similar one.

Mr. Puzder declined to comment for this article, but upon nominating him in December, Mr. Trump said Mr. Puzder would “fight to make American workers safer” and “save small businesses from the crushing burdens of unnecessary regulations that are stunting job growth.”

Worker advocates have opposed Mr. Puzder’s nomination, citing lawsuits that workers filed against CKE Restaurants, the parent company of Carl’s Jr. and Hardee’s, as well as wage violations at those restaurants. Mr. Puzder is chief executive of CKE.

More from The New York Times:

Immigration Order Complicates U.S. Businesses’ Plans in the Middle East

Trump Moves to Roll Back Obama-Era Financial Regulations

Fiduciary Rule Is Now in Question. What’s Next for Investors.

His confirmation hearing before a Senate committee has been delayed four times. His spokesman said Mr. Puzder, 66, was working to divest from his company.

“He doesn’t view laws and regulations as things that help protect the most vulnerable from exploitation. He looks at them as things that hinder him from doing what he wants to do,” said Judy Conti, who oversees federal advocacy for the National Employment Law Project. “That’s antithetical to the mission of the Department of Labor.”

Mr. Shenker led a life fit for the movies. A Jew, he fled Russia as an orphaned teenager in the 1920s to join his older brothers in St. Louis. He went on to become one of the best-connected lawyers in America.

He was also a mob lawyer. In his thick accent, Mr. Shenker sometimes said he would rather see a guilty man go free than an innocent man go to jail. But his work on behalf of organized crime figures went beyond the courtroom.

Through one of his most notorious clients, the former Teamsters president Jimmy Hoffa, Mr. Shenker gained influence in the mid-1960s over the Teamsters’ enormous Central States pension fund. According to an investigation by Life magazine, Mr. Shenker built a fortune from fees he was paid to fast-track loans from the fund to businesses. In 1973, he took control of the Dunes Hotel and Casino in Las Vegas and a resort in California.

Married and supporting two children, Mr. Puzder began working at the Shenker law firm while a full-time student at Washington University School of Law in St. Louis, finding it more attractive than the construction work he had been doing to earn money.

Mr. Puzder joined the firm full time after graduating in 1978, a career choice that bewildered some who knew him. The firm was fading in relevance, with its famous principal spending much of his time in Las Vegas.

But Peter Sadowski, who worked part time at the firm with Mr. Puzder while both were in law school, said Mr. Shenker had enticed Mr. Puzder with the chance to handle the high-profile lawsuit already underway in Las Vegas.

“Shenker wanted him to lead the defense,” said Mr. Sadowski, now an executive vice president at Fidelity National Financial, a major seller of title insurance. Politico recently reported on Mr. Puzder’s work for Mr. Shenker.

Mr. Shenker’s fortunes had changed quickly after Congress passed the Employee Retirement Income Security Act of 1974, which, among other things, protects worker pensions from being raided by their employers.

The next year, the Teamsters pension fund backed out of a $40 million loan that Mr. Shenker wanted for an expansion of the Dunes. Mr. Shenker sued, and the Labor Department joined the case with the pension fund.

In 1980, after a federal judge summarily dismissed the case halfway through the trial, Mr. Puzder presented the appeal at the United States Court of Appeals for the Ninth Circuit in San Francisco, arguing, in part, that the loan was promised before the new law took effect.

In court filings, Labor Department lawyers described Mr. Puzder’s efforts as “a vigorous but futile attempt to backpedal, sidestep, and otherwise avoid the absolute barriers” of the pension protection act known as Erisa. The appellate judges denied Mr. Puzder’s appeal.

By then, another spigot of union pension money had gone dry.

The pension fund for the culinary workers union in Las Vegas had been extending loans to Mr. Shenker with no restrictions since 1973. A new pension fund chairman — Richard P. Crane, a former federal prosecutor — was appointed in 1976 and concluded that the Shenker loans were “a total rip-off.” He insisted on all but shutting down the flow of money.

“Shenker went nuts,” Mr. Crane recalled.

In 1977, the Labor Department sued Mr. Shenker, accusing him of failing to repay the $24.9 million it said he had illegally borrowed from the Southern Nevada Culinary and Bartenders Pension Trust. The total represented more than half of the trust’s assets.

The case proceeded slowly. During a 1982 hearing of the Senate committee that oversees labor, Senator Orrin G. Hatch, Republican of Utah, accused the Labor Department of “blatantly coddling” Mr. Shenker for years.

Labor officials saw the case as an early test of using Erisa to rid unions of corruption. Seven lawyers were sent to Las Vegas from Washington. For Mr. Shenker, repaying the money would have threatened his financial survival.

Mr. Puzder, then 32, and a colleague from the Shenker firm, E. Michael Murphy, left St. Louis for Las Vegas. As he stood to make a point in the trial’s opening days, the months of grueling preparation caught up with Mr. Puzder: He promptly collapsed to the floor, fainting in front of judge and jury.

After regaining his composure, he attacked government regulators, claiming they had a “vendetta” against his boss. “Some people in the Department of Labor were more concerned with pursuing Shenker than they were with recovering the trust’s money,” Mr. Puzder said, according to The Las Vegas Sun.

He argued that Mr. Shenker was financially harmed when the pension fund stopped making payments on a loan extension in 1977. He said the Shenker investments had been well on their way to becoming successful.

The federal judge, Roger D. Foley, was unimpressed, at one point saying that the money appeared to have gone down “a rathole.”

The specter of organized crime hung over the trial. Tapes of a 1979 meeting between Mr. Shenker and two mob figures — Joey (The Clown) Lombardo and Allen Dorfman, a well-known liaison between the mob and Hoffa’s Teamsters union — revealed Mr. Dorfman complaining that Mr. Shenker had failed to pay him kickbacks on millions in loans that Mr. Shenker had procured from the Teamsters. Newspapers covering Mr. Lombardo’s 1983 sentencing hearing splashed the incriminating transcripts across their pages.

The government was determined to reduce the Shenker case to its most basic elements. “In my opening statement to the jury, I said, ‘You may hear a lot from the defense about how complicated this is, but it’s simple,’” Mr. Temchine said. “‘He borrowed a thousand bucks from each member and promised to give it back, with interest. He didn’t.’”

The jurors agreed. After the five-month trial, Mr. Shenker was required to repay all the money he had borrowed, plus interest, for a total of $34 million.

“I think he’s too good a con man for me to mix with,” one juror told The Las Vegas Sun. “I’d be like the pension fund. I’d lose on the deal.”

Months later, Mr. Shenker filed for bankruptcy, citing $184 million in obligations. About that time, Mr. Puzder and Mr. Murphy left his firm, which limped along until Mr. Shenker was indicted on bankruptcy and tax fraud charges in 1989. He died later that year.

During the bankruptcy case, government lawyers were able to extract $26 million for the pension fund, Mr. Temchine said.

At least one time as a lawyer, Mr. Puzder was on the other side of such a case, helping to represent the interests of a police pension fund that had been defrauded by its investment managers. His team argued that the managers were essentially stealing from the widows of police officers.

At his labor secretary confirmation hearing, one challenge senators may choose to take up is determining whether Mr. Puzder ultimately favors protecting workers, or executives like himself and his old boss.

In a surprising turn, that confirmation hearing could place Mr. Puzder face to face with Mr. Hatch, the senator who once said the Labor Department had been going soft on Mr. Shenker at the same time Mr. Puzder claimed the department had been unfairly tough.

Almost 35 years later, Mr. Hatch still sits on that committee. And while he praised Mr. Puzder in December as someone who “will bring invaluable expertise to the Department of Labor,” he may well be reminded of the time he scolded a Labor Department official in front of his fellow lawmakers.

“I am still not sure,” Mr. Hatch said at the time, “if some of you understand the enormity of the problem that these actions by Mr. Shenker and the Labor Department’s poor oversight have caused the 30,000 workers covered by this pension fund.”

Melissa Wen contributed reporting from San Francisco.