FILE - This 2015 photo provided by Michael P. Shamo shows his son, Aaron Michael Shamo. At the center of a multimillion-dollar opioid case, he testified Tuesday, Aug. 27, 2019, that he saw himself as helping people get prescription drugs they needed while making money for himself and his friends. (Michael P. Shamo, via AP)

SALT LAKE CITY (AP) — Prosecutors have called Aaron Shamo the kingpin of a multimillion-dollar drug ring that shipped hundreds of thousands of potentially deadly opioid pills across the country from a suburban Utah basement.

Shamo took the witness stand Tuesday at his trial and downplayed his role in the operation that authorities have blamed for at least one overdose death.

He said his friends were also deeply involved as sales of fake oxycodone grew and he told himself he was helping people get drugs they needed while making money for himself and his friends.

The affable, clean-cut former eBay worker testified that he got messages from grateful customers who said their doctors had refused to prescribe any more painkillers. He also said people without insurance had to pay far more for the drugs in the legal marketplace.

"It seemed like a good idea, it was a win-win situation," the 29-year-old Shamo testified.

He said the operation began with reselling legitimately obtained prescription drugs, and as it grew his friends were involved in key steps along the way.

Shamo said his roommate and "brainiac" friend Drew Crandall came up with the idea to press their own Xanax pills. Crandall later pleaded guilty to drug distribution and money laundering charges.

Another friend suggested they begin making fake oxycodone with fentanyl.

"At the time no one was screaming 'stop.' Everyone was benefiting," Shamo testified. "It went from being a hobby to something where my eyes were a little too big. This wasn't what I expected at all."

Shamo is charged with operating a criminal enterprise, selling drugs that caused a fatal overdose and other counts.

Prosecutors say he was taking trips and partying at clubs with the money he made off fentanyl-laced fake oxycodone. They have said the drugs he sold caused at least one fatal overdose and may be linked to dozens more as the nation's opioid crisis spiraled into a fentanyl epidemic.

Prosecutor Michael Gadd said during cross-examination that Shamo kept more than $1 million stacked in his dresser drawers and stashed nearly $500,000 more in his parents' closet in Arizona.

Gadd also said Shamo took trips to California, Las Vegas and Puerto Rico with friends, bought bottle service at clubs and treated himself to designer clothes.

He pointed to a note he said Shamo wrote to himself on his computer on Jan. 1, 2016, saying he was going to "overachieve," be "(expletive) rich" and a girl he liked would become "obsessed" with him.

Shamo explained the note by saying he had been trying to make himself feel better with a visualization exercise inspired by the self-help book "The Secret."

Prosecutors have said Shamo bought fentanyl from China online and then mixed it with fillers and pressed it into pills with another friend, Jonathan Luke Paz, who has also pleaded guilty in the case.

The operation sold nearly a half-million pills, authorities have said.

The pills were sold through a dark-web marketplace store called Pharma-Master. The dark web is a second layer of the internet reached by a special browser and often used for illegal activity.

Shamo testified that he had tried party drugs but grew up in a middle-class family who were members of The Church of Jesus Christ of Latter-day Saints, so he knew little about addiction before he went to jail more than two years ago.

"You don't see the ripple that it has on all these people and their families," he said, crying on the witness stand. "I got to see the struggle and it's just brutal."

FILE - This booking photo provided by the Weber County Sheriff's Office shows Aaron Michael Shamo. Shamo, a 29-year-old man at the center of a multimillion-dollar dark web opioid drug ring case says he saw himself as helping people get prescription drugs they needed while making money for himself and his friends. Shamo took the stand in a federal courtroom in Salt Lake City on Tuesday, Aug. 27, 2019, miles from the suburban basement where he and a friend pressed thousands of fentanyl-laced fake oxycodone pills that were shipped to people all over the country. (Weber County Sheriff's Office via AP, File)