As they rushed toward a suburban Utah home with guns drawn, agents knew they were on to a significant figure in the Silk Road online drug bazaar — a major cocaine dealer, perhaps.

Message boards on Silk Road — the world's most popular online drug market — had been buzzing about the sale that triggered this bust. Users of the encrypted website advertised drugs, forged documents and hacking tools for sale through seemingly anonymous transactions, but a kilo of pure Peruvian cocaine was something special.

Federal authorities in Baltimore had been working for a year to breach the inner circle of Silk Road's kingpin, whom they knew only by the alias Dread Pirate Roberts. They figured that whoever agreed to accept the drugs would get them closer, but never imagined the breakthrough they were about to make.

The man hauled from his home that winter morning was Curtis Clark Green, a senior administrator with wide access to Silk Road's inner workings. Federal officials say his capture helped lead agents to Ross William Ulbricht — the man now accused of running the site — but also brought about a violent twist in what had been a straightforward drug case.

Operation Marco Polo, named after the medieval traveler who followed the Silk Road to China, ended last month in a major takedown, triggering arrests on three continents and the seizure of tens of millions of dollars in assets. Agents crept in to nab Ulbricht in a San Francisco public library, began draining online accounts connected to the site and slapped a notice over the Silk Road login screen.

"This hidden site has been seized," read the notice with images of shining special agent's badges below.

Ulbricht is due Thursday in federal court in Manhattan, where he is asking to be released while the case is pending. Ulbricht's lawyer has announced plans to contest charges that his client was Dread Pirate Roberts.

The collapse of Silk Road traces back to 2011, when it caught the attention of Homeland Security Investigations. With buyers and sellers around the globe, Silk Road seemed the perfect target for the large but little-known arm of federal law enforcement with an office in Baltimore's imposing customs house.

Court documents and interviews with authorities involved in the case describe how the inquiry grew from a Harford County drug bust into a nationwide operation that drew in the FBI and the Drug Enforcement Administration.

John Eisert, a senior HSI official in Baltimore, said the plan was to make moves that would "shake the trees," dislodge new details and lead agents closer to Dread Pirate Roberts.

FBI officials in New York later started working to break through the wall of encryption that protected Silk Road and many of its users from public exposure. But the agents in Maryland were tasked with developing informants, setting up drug busts and cutting deals with people in handcuffs.

The investigation started with a tip from one of HSI's informants. At that point the site was less than a year old, but already on course to develop into a hub for illicit online deals.

Silk Road ran on the Tor network, a system designed to hide the site's location and mask the identity of its users. Deals were done in Bitcoin, a digital currency not backed by any bank or government and difficult for law enforcement to trace.

Among the first breaks for HSI was the January 2012 arrest of Jacob Theodore George IV. The Edgewood man had been using Silk Road to sell heroin and imported Chinese methylone — a synthetic drug similar to ecstasy — under the alias "digitalink."

His arrest would be kept secret for two years until his guilty plea this month.

"Now we were on the inside," said an agent who requested anonymity to discuss an ongoing case. "It paved the way to go after other vendors."

At that point, the HSI grasped the full scope of Silk Road.

"As each day went on we realized how big this really is," Eisert said. "It was the most visited website in Tor and you don't fully grasp that the first time you sign on."

HSI began working with the Drug Enforcement Administration, which in the spring of 2012 launched an undercover operation to wheedle its way into Dread Pirate Roberts' inner circle.

Using the alias "nob," an undercover agent started chatting with Dread Pirate Roberts from the 21st floor of a downtown Baltimore skyscraper. The agent was working to gain the leader's trust while probing for details that might help uncover his true identity.