BANGOR, Maine — When Thomas E. Delahanty II served a 15-month stint in 1980 and 1981 as Maine’s U.S. attorney, his staff was busy prosecuting people smuggling tons of marijuana into Maine’s coastal coves.

When the former state judge last month finished his second stint as U.S. attorney — this time having served nearly seven years — Maine was averaging more than one drug overdose per day due to an influx of heroin and other opiates.

“When I started, possession of marijuana, no matter the amount, was a felony,” Delahanty, 71, of Falmouth said recently. “Now it’s legal. The public attitude toward drugs like that has changed dramatically.”

Appointed U.S. attorney first by President Jimmy Carter and, decades later, by President Barack Obama, Delahanty was removed from office in early March by President Donald Trump. A permanent replacement has not been named.

Looking back over his long career, Delahanty pointed to evolution of the federal war on drugs and to computerization — both of crime and crime fighting — as among the biggest changes he observed.

“Back when I first started, you didn’t see the organized [drug-trafficking] groups from out of state and the violent groups coming in that you get today,” Delahanty said. “Back then, local people might go to Massachusetts or New York to get drugs and bring them back.

“Now, we have people from out of state actually bringing it up here,” he said. “The profits are such that they look at it as a business opportunity. Law enforcement keeps working away at it, but the drug dealers always seem to be ahead of it.”

Meanwhile, the number of people the federal prosecutor supervised increased dramatically. In 1980, there were five assistant prosecutors and six support staff. More than 35 years later, there are 24 assistants and 33 or 34 support staff.

But, Delahanty said, “The real difference has to do with the computerization.”

He continued, “With the increase in cybercrimes — online fraud, credit card fraud, child pornography — even in drug cases — there’s a lot of evidence that comes from electronic communication devices: cellphones, iPads, laptop computers and all that other electronic communication that helps link people together.”

Computerization also has made coordination with the U.S. Department of Justice in Washington, D.C., and prosecutors in other states easier. As a U.S. attorney in the 21st century, Delahanty represented his office on committees and task forces that didn’t exist three decades ago, including Project Safe Childhood, focused on preventing child sexual exploitation and abuse, Project Safe Neighborhoods, aimed at reducing gun and gang violence, the Human Trafficking Task Force and the Maine Opiate Collaborative.

While federal criminal cases garner the most media attention, federal prosecutor’s offices also handle many civil claims, defending government agencies in cases ranging from auto accidents to employment discrimination to medical malpractice. In addition, foreclosures that involve federal loans are handled by the U.S. attorney’s office.

One of the things Delahanty said he is proud of is the record amount of money, $3.7 million, collected in criminal and civil actions in the fiscal year that ended Sept. 30. That total includes the $1.6 million Haynes Timberland Inc. paid to retain ownership of Township 37, where an illegal pot plantation was located.

“That is more than New Hampshire and Vermont [collected] combined,” Delahanty said.

When Delahanty became a lawyer, he essentially went into the family business. His maternal grandfather, John David Clifford Jr., was a federal judge in Maine. And his father, Thomas E. Delahanty, served on the Maine Supreme Judicial Court from 1973 until 1979 after serving on the Superior Court bench.

The younger Delahanty was the district attorney for Androscoggin, Franklin and Oxford counties before becoming a justice on the Maine Superior Court in 1983.

“I really think my years on the bench made me a better [federal] prosecutor,” Delahanty said. “There were times when some of the assistants would come in and ask, ‘If this were tried in front of you, what would you think?’ And, I think because of that, sometimes the charge might be more or less serious.”

Delahanty said last week that he is not interested in retiring but has yet to find a new job.

One of the people who already misses having Delahanty serving as U.S. attorney is Maine’s top prosecutor, Attorney General Janet Mills, who worked with him on the Maine Opiate Collaborative.

“It was Tom Delahanty’s brainchild,” she said. “The collaborative conducted dozens of public forums across the state and collected valuable information about opiate abuse from hundreds of providers, community members, educators and people in recovery. Its recommendations are the subject of legislative action currently.

“This initiative is indicative of the character of Tom Delahanty … who has always been out front of the problems of the day,” Mills added.