Not long after moving to Florida, Andrew Berke met Tampa real estate lawyer Walter "Chet" Little.

Both lived in Mirabay, a planned community in Apollo Beach designed to evoke the leafy, genteel charm of a true Southern town. Their kids played together in the big community pool with its waterslide and carded entrance.

Berke, an executive with a shipping company, and Little, a $400,000 a year partner in a top Tampa law firm, soon became friends. They often texted.

Chet to Andy: What's your plan for the day?

Andy to Chet : Pool? Library?

Andy to Chet: Heading to Colorado for guys ski trip next fri-tues. You're welcome to join.

Just banal texts between two friends. Or were they?

Chet to Andy: I think Publix is running a sale on Wheaties. You should pick up some tomorrow.

Neither man had any interest in cereal. Little was texting about Whiting Petroleum, a publicly held company represented by his law firm. The coded message to Berke: It is a good time to buy stock in Whiting.

For over a year the men texted back and forth — often in code — about other public companies represented by Little's firm: Harley-Davidson. Oshkosh. Magnetek. All were in confidential talks about mergers and other actions that would affect their stock prices.

Meanwhile, the men's bank accounts began to swell — eventually by a total of more than $700,000.

RELATED COVERAGE: For the Florida Bar, bad lawyers are more than a punch line

It was still dark on the morning of May 11, 2017, when FBI agents barricaded the Berkes' neighborhood. Andrea Berke hustled their two children into a bedroom as her husband was led away. At the same time, agents were arresting Little and seizing his cell phone.

The charges: Multiple felony counts of securities fraud and conspiracy to commit securities fraud. It was among the few cases nationwide in recent years in which a lawyer was charged with illegally accessing and trading on information about a publicly held company.

Before their arrests, neither Little nor Berke had a criminal record. One would quickly admit he acted out of greed. One would later claim a bipolar condition had distorted his judgment. As often happens with the specter of years behind bars, one friend turned against the other.

MORE: Go here for more Business News

• • •

By the time he was 42, Little had become a partner in the Tampa office of Foley & Lardner, an international law firm whose clients include Major League Baseball.

It was an impressive rise spurred by a difficult childhood. Just 5 or 6 when his parents divorced, he went to live with his father in the north Florida town of Starke, best known for its proximity to a big state prison. As he got older, he spent summers in California, where his mother, an electrical engineer, had moved with her other son, David.

"Southern California had big houses with fancy cars and wealthy people," David Little would later write to the judge in his brother's case. "By contrast, Starke was a little backwoods. I think Chet grew to hate/resent Starke over California and this helped drive him to want more and to never settle for anything less."

With part-time jobs, scholarships and some help from his father, Little made it through the University of Florida's undergraduate and law schools. His brother got him a suit for his first job interview after graduation.

In 2005, following stints at law firms in West Palm Beach and Jacksonville (where he met his wife, Angela) Little joined Foley & Lardner in Tampa. Among those impressed with his work was banker Eugene Son.

"Chet did a better job representing the borrowers than our counsel had done representing our bank,'' Son later wrote. "He was clearly more competent and harder working than the long established Tampa attorneys that our firm had historically engaged.''

On Son's recommendation, the bank retained Little as its legal counsel and the two men became friends.

Little also served as pro bono counsel for Sertoma, the non-profit that helps deaf people. "Chet always worked with the highest integrity,'' one Sertoma executive said.

The Littles had been living in Mirabay for four years when the Berkes moved to a house a few blocks away in 2009.

The family was from Chicago, where Berke, who had an MBA from Northwestern University, first worked as a futures trader at the Chicago Mercantile Exchange.

He soon got into the shipping business, founding a firm called Freight Ready that helped clients get the best prices from trucking companies. He envisioned it as the "Travelocity" of its niche in the shipping industry.

In 2009, Berke sold Freight Ready to BlueGrace Logistics, a shipping management company in the Tampa Bay area. Three years later, Inc. magazine listed it as nation's 20th fastest growing private company.

"When Andy came on board, we stood with 18 BlueGrace employees," Bobby Harris, the company's founder, later wrote to the judge in Berke's case. "Currently, we employ 650. This is in no small part due to Andy's ability to spot talent and then maintain relationships and bring them on board."

• • •

Life in Mirabay centered around the community pool, the country club and neighborhood get-togethers. The Littles and Berkes grew close: The Littles supported Andrea Berke through a serious health problem, and their daughter often played at the Berkes' house.

As their own friendship grew, Little and Berke invested in a couple of real estate deals. Berke, with his trading background, shared his research on commodities-based stocks.

In 2013, Little started giving Berke stock tips, too. He suggested they make the same investments.

As his lawyer would later contend, Berke had no reason at first to think his friend had inside information: Some of Little's suggestions led to substantial losses for both. Then his predictions about certain companies became more accurate. And more profitable.

Berke asked him where he was getting his information.

Little acknowledged some of it came from sources in his law firm. But he said it was from a "non-restricted" area of Foley & Lardner's databases and did not involve any of his own clients. If Berke didn't want to make trades, fine, Little told him, though as a lawyer he felt comfortable with what they were doing.

For a time, Berke was okay with that explanation. He "could not believe Mr. Little would risk his successful and lucrative legal career for the relatively small initial gains they were making in the trades," his lawyer wrote.

In 2015, that changed. While at Little's house, Berke saw his friend log on to Foley & Lardner's server and search for information on Magnetek, a technology company about to merge with another firm.

Now it became obvious — Little was not a "passive recipient" of information, as he claimed. Nonetheless, Berke went on to make trades in Magnetek, Whiting Petroleum — "Wheaties"' in their text code — and two other companies. Berke also made trades for Little, and Little made numerous trades of his own.

In 2016, he began asking Berke to pay for the tips he was providing although he suggested he do so in the form of invoices for legal work. No legal work was actually done, but Berke eventually paid him almost $90,000.

It was about this time that Foley & Lardner discovered the illicit use of its databases, launched an investigation and reported its findings to authorities. On June 20, 2016, Little departed — it is not clear from the firm's later statement whether he was fired or allowed to resign.

Within three weeks, he joined another Tampa law firm, Bradley Arant Boult Cummings. It issued a press release praising his "leadership and reputable real estate and finance practice." Remarkably, he would be working in the same downtown office tower — 100 N. Tampa — that housed the firm he had just left.

• • •

Early last year, Berke got a call from an attorney with the U.S. Securities and Exchange Commission. He wanted to know about the trades in Magnetek stock.

Berke contacted Little, who by then was living in South Tampa's Westshore Yacht Club. What should I do? Berke asked. Little told him to find old analysts' reports that could provide a retroactive justification for his trades.

Berke ignored the advice and hired a lawyer, who contacted the SEC. They were expecting an SEC subpoena: the FBI showed up instead.

The arrest of Little, a partner in a major law firm, garnered widespread attention in the business and legal press. "Why People Persist in Risky Trading'' headlined a May, 15, 2017, New York Times story that prominently mentioned him.

Little, denying the charges, pleaded not guilty. Berke, though, quickly offered to cooperate with the government and "make amends for acts he freely admits were motivated by greed," his lawyer wrote.

Berke twice met with prosecutors in Manhattan, where the case was filed because the trades were through New York-based stock exchanges. At his own initiative and expense, he hired a data recovery firm to retrieve texts he had exchanged with Little and then helped prosecutors crack the "code."

The texts "were highly incriminating," wrote Joon H. Kim, acting U.S. Attorney for the Southern District of New York.

Almost as soon he learned prosecutors had the texts, Little changed his plea. He agreed to plea guilty to one count of conspiracy to commit securities fraud and forfeit $452,998 — his profits on illegal trades and the kickbacks from Berke.

In a memorandum to the judge before sentencing, his attorneys attributed Little's actions to an undiagnosed bipolar disorder and the drug he was taking for what doctors wrongly thought was Attention Deficit Disorder.

" Mr. Little's misdiagnosis and use of a prescribed powerful amphetamine… played a large role in his reasoning and judgment, which resulted in this criminal behavior," his lawyers wrote.

Friends and relatives also suggested that Little's judgment had been impaired by heavy drinking due to job stress and chronic pain from back surgery.

"I think that's how he was coping with everything," Angela Little said in a statement submitted to the court.

Little's lawyers asked for 200 hours of community service, arguing he be spared prison for several reasons: It would be a financial hardship on his family. He faced a "crippling tax burden." He was undergoing treatment for drug and alcohol abuse.

Prosecutors would have none of it.

They noted that Angela Little, chief financial officer for a Tampa law firm, earned a high salary, making the family "better situated than most others to absorb the impact of his incarceration." They noted that Little owed so much to the IRS only because he and his wife made "an incredible amount of money'' in 2016 — $822,360 — and he failed to withhold anything for taxes, assuming he could pay them with a year-end bonus from Foley & Lardner. And they noted he had not sought treatment until shortly before his sentencing date.

On Feb. 23, Judge Katherine Polk Failla sentenced Little to 27 months in prison. That was 22 months longer than the sentence lifestyle guru Martha Stewart received for lying to the FBI in a 2001 insider trading scandal. It was twice as long as the sentence former Wall Street Journal reporter J. Foster Winans received in the 1980s for leaking the contents of his columns to a stockbroker friend.

But it was in line with the "significant" prison term prosecutors sought, citing Little's "particularly egregious" conduct.

As an lawyer, he knew what he was doing was wrong, they said. His trading was not a one-time mistake but a "calculated" series of trades that went on for well over a year. Without him, Berke would not have committed his crimes. And Little showed a "complete disregard for the law" by telling Berke to lie to the SEC

On the other hand, Berke had cooperated with the government almost from day one.

"This decision speaks volumes about Berke's acceptance of responsibility and his character," prosecutors told the judge. "He should be rewarded for it."

On April 17, the judge sentenced him to four months of house detention. She also fined him $10,000 and ordered him to forfeit $249,850.

• • •

Although he too pleaded guilty to one count of conspiracy to commit securities fraud, Berke remains an executive with BlueGrace. He can leave home to drive the 17 miles to the Riverview-based company, now a major player in the shipping management business.

Berke, now 50, did not respond to emails or a message left at his home.

Little's future, even after he gets out of prison, is far less clear. His new law firm, which said it had known nothing about the illegal activity at his previous firm, immediately canned him. He has been suspended from practicing law and could be disbarred, possibly for life.

Like Berke, Little also faces an SEC suit that could result in substantial civil penalties.

Soon after the arrests last May, the Littles moved into an apartment and sold their house in Westshore Yacht Club for $805,000, about $30,000 more than they paid. A house they bought in Mirabay in 2005 — not their main home there — is on the market for $495,000, about $145,000 less than they paid.

"Nope, sorry," Little said when reached by phone and asked if he would like to speak for this story.

The judge recommended he serve his time in a prison camp in Pensacola or "a similar Florida facility,'' close enough that his family can visit. He must report to the Bureau of Prisons by June 29 — a few weeks before his 45th birthday.

Contact Susan Taylor Martin at smartin@tampabay.com or 727-893-8642. Follow @susanskate