Homeland Security investigators spent three years luring a suspected Namibian smuggler to Philadelphia, to make a rare arrest under a federal law banning trade in so-called conflict diamonds.

But when Karl Christian Loibenboeck, a Windhoek-based real estate agent, finally arrived here last month, he ended up in custody for another crime altogether.

The probe spanned continents and had a few false starts - including Loibenboeck's arrest last year in South Africa with what authorities thought were five rough diamonds stuffed in his underwear.

But on Thursday, the wiry, bespectacled 39-year-old stood before a federal magistrate in Philadelphia and pleaded not guilty to one count of wire fraud, denying charges that he'd tried to pass off topaz stones as 100 carats of diamonds.

In an interview afterward, Loibenboeck's lawyers, Elizabeth Toplin and Mark Wilson, questioned the resources that landed their client in custody and pointed out that federal agents had encouraged his alleged crime.

"Anyone who's going to reach out to buy blood diamonds is crooked to begin with - but nobody actually tried to buy them in this case except the agents," Toplin said.

Since 2003, federal law has tried to stanch the flow of conflict diamonds into the United States in an attempt to stop their sale here from benefiting warlords or insurgents in conflict-plagued diamond-producing nations like Angola, Sierra Leone, and the Democratic Republic of the Congo.

The U.S. is one of 81 nations participating in an initiative known as the Kimberly Process, which requires that all imported rough diamonds be shipped in sealed containers with a certificate affirming their origins.

But prosecutors say Loibenboeck, whom investigators first encountered over the internet in 2013, made clear from the start that the Angolan diamonds he claimed to be selling online were not Kimberly-certified.

In a series of calls with Homeland Security Investigations agents posing as buyers for a diamond wholesaler, he called the certification process "a scam" and "a government prank," according to court filings.

He allegedly explained to the agents that he recently sold a 57-carat diamond to buyers in Los Angeles and had "friends at the airport" in Namibia who would look the other way and were like "loaded dice in our favor."

"If I've got a good buyer . . . I deliver," he allegedly said in one February 2014 conversation. "So I take the risk element out of the equation."

Prosecutors say Loibenboeck began earnest discussions last year with the agents regarding a proposed $250,000 sale of five rough diamonds - a deal he only agreed to after they sent him photos of the cash stacked on top of a newspaper.

Arrangements were set for a meeting in Philadelphia in December 2015.

But when the time came, Loibenboeck never showed.

He resurfaced four months later, emailing the agents a link to a South African news story.

By that time, the investigators already had learned that Loibenboeck had been arrested en route to the meeting in the U.S. at Cape Town International Airport, where South African customs agents had found him wearing two pairs of underwear, with the five stones he intended to sell in Philadelphia hidden in the outer pair.

Still, Loibenboeck was undeterred, investigators say, and by April - days after South African authorities dropped their case against him after discovering that the diamonds were fakes - he reached back out to the agents to set up another sale.

Still maintaining that his products were real, he allegedly told agents that the case against him in Cape Town had evaporated after he stole the seized rocks back from South African police.

"I paid people to get back my goods," he said, according to court filings. "That's how things work around here. As long as you've got the money and you've got the connections, anything is possible this side of the world."

Within months, Loibenboeck had set up a new meeting for the transaction in Sharon Hill, Delaware County.

But before his departure, he expressed concerns to the undercover agents about having another run-in with the authorities on the way.

"To move with goods, my man, it's like getting kicked by the same donkey two times," he said in a phone conversation quoted in the filings. "The first time, it's an accident. The second time, I'll be an idiot."

This time, however, he made it. And this time, on Nov. 9, the agents were waiting.

Loibenboeck is being held without bond at the Federal Detention Center in Philadelphia. A trial date has not been set.

215-854-2608 @jeremyrroebuck