A former Wilmington Trust loan officer who wore a wire for the FBI and was the government’s key cooperating witness against colleagues was sentenced to 21 months in prison Tuesday for his role in the multimillion-dollar fraud that triggered the former banking titan’s demise.

Joseph Terranova was the seventh and final former top Wilmington Trust official sentenced to prison in recent weeks. Those who will spend time behind bars include ex-president Robert Harra and chief financial officer David Gibson, both sentenced to six years behind bars and $300,000 fines.

Terranova had secretly recorded conversations with a colleague and developers during a regular canasta game they played, and his actions provided beneficial to FBI agents and federal prosecutors as they built their case. Terranova pleaded guilty to conspiracy to commit fraud in 2013. Assistant U.S. Attorney Jamie McCall called him the No. 1 witness against other bank officials.

Sentencing guidelines called for a 21-month prison term. But McCall noted that, despite Terranova’s cooperation, he had the bank’s biggest commercial loan portfolio and was central to the fraud scheme.

McCall pointed out that Terranova wired developer Michael Zimmerman $1 million against the bank’s lending policy after Zimmerman sent him this fax: “Send $1,000,000 ASAP I have to pay my bar tab.”

Zimmerman, who was charged with bank fraud and money laundering, died in 2015.

Ten people were charged in the case. Also sentenced to prison were former Midcoast Community Bank CEO James Ladio and developer Salvatore Leone.

Terranova, who now runs another business, told the judge he was “deeply sorry’’ for his crimes and that they filled him with “shame and remorse.”

His attorney, Patrick J. Cotter of Chicago, asked U.S. District Judge Richard G. Andrews to confine Terranova at home, arguing that putting him behind bars would not “move the needle of deterrence.”

Despite the serious nature of Terranova’s crimes, Cotter argued that “does not mean automatically there must be jail.”

Even though Andrews handed down sentences shorter than guidelines for two former loan officers last week, he was not swayed by Cotter’s argument. Andrews also levied a $15,000 fine and gave Terranova three years of probation after his release.

“The banking system counts on the integrity of people who have the discretion’’ to spend or lend the money of shareholders and investors, Andrews said. In an apparent rebuke of Cotter, Andrews said anyone who commits serious crimes against the banking statutes deserves “a term of imprisonment.”

Wilmington Trust collapsed from loans that went bad

The government’s case against those who helped destroy the once-venerable Delaware banking institution is now concluded, McCall said outside court.

Harra and other officials involved in the fraud gambled and lost tens of millions of dollars on residential and commercial developmental projects in coastal Sussex County.

Founded in 1903 by the president of the DuPont Co. to manage the family’s growing wealth, Wilmington Trust is the only U.S. financial institution that received money from the 2009 federal bank bailout program to be charged criminally.

By the end of 2009, the bank reported only $10.9 million in bad loans, but prosecutors said, it still held more than $360 million in past-due loans. The bank also raised $287 million in investments without disclosing its financial problems to investors.

When the defendants knew they could no longer hide the practice, prosecutors said, they created a “mass extension process” of temporarily extending loans on a short-term basis.

In under two months, the bank allegedly extended about 800 loans worth more than $1.3 billion. Prosecutors said some borrowers didn’t know their loans had been extended.

The bank was sold in November 2010 to Buffalo, N.Y.-based M&T Bank at a fire sale price. Wilmington Trust’s former investment arm and wealth advisory division is now an M&T subsidiary under the Wilmington Trust banner, but all the former consumer branches now carry the name M&T Bank.

Beyond the four convictions last year at trial and three earlier guilty pleas by former officers, last year the bank reached a $60 million settlement with prosecutors and agreed to pay $200 million to settle a shareholder lawsuit.

U.S. Attorney for Delaware David C. Weiss echoed McCall in saying the government was satisfied with the resolution of an investigation that lasted more than seven years.

“This has been a long investment, a substantial investment by our office, but a worthwhile investment,” Weiss said outside court. “It was an important prosecution for this state, and I think the results signify that this was a significant white-collar matter. We treated it as such, and we are completely satisfied that the court recognized and treated these defendants seriously.”

During the trial of Harra, Gibson and two other top officials last year, defense attorneys had openly questioned why the bank’s chief executive officer, Ted Cecala, escaped prosecution when other defendants, including Harra, reported directly to Cecala.

Asked about the omission of Cecala from the government’s case, Weiss said Tuesday, “We prefer to focus on the people we have prosecuted and the successes we’ve had, rather than those who may not have been prosecuted along the way.”