In the years since the Sept. 11 terrorist attacks, the FBI has routinely relied on undercover operations similar to the one that led to the arrest of Samy Mohamed Hamzeh in Milwaukee this week.

Hamzeh is accused in a criminal complaint of plotting a shooting attack on a Masonic temple in Milwaukee. An FBI special agent's affidavit says Hamzeh talked of his plans in conversations that were recorded by a pair of confidential informants, and later purchased machine guns and silencers from undercover FBI employees. So far, he faces only weapons charges.

Wisconsin's top federal defender said Hamzeh's defense is likely to focus on the accuracy and completeness of recordings that were translated from Arabic, as well as what the FBI informants were saying to Hamzeh.

Here are some details on similar sting operations:

THE FBI'S POSITION:

The FBI sees sting operations as vital tools in preventing acts of terrorism and appropriate to use against those who have expressed an inclination toward violence. The targets come to the attention of the authorities in various ways, sometimes through information from a confidential FBI informant or via online writings that promote jihad or profess allegiance to terrorist groups.

DEFENSE LAWYERS' POSITION:

Defense attorneys frequently challenge the operations in court, contending that their clients were entrapped and suggesting that agents are taking advantage of a defendant's misguided thoughts or mental illness. They accuse investigators of effectively grooming clients into plotting acts of terror.

HOW THE STINGS WORK:

Typically, undercover agents pose as conspirators and discuss terror plots and targets with suspects. Arrests are often made immediately after the person is provided with weapons or what he believes to be explosives. Federal authorities say the targets often have opportunities to back out of the plot.

SOME EXAMPLES:

— A Kansas man who was under investigation for six months after making statements about wanting to commit "violent jihad" was arrested in 2013. Authorities say he drove a vehicle loaded with what he thought were explosives to a Wichita airport. He was sentenced to 20 years in prison after a plea deal.

— In 2012, a man plotted to detonate a suicide bomb at the U.S. Capitol. He had communicated with undercover agents posing as al-Qaida operatives and was then arrested after putting on what he thought was an explosive-laden suicide vest.

— That same year, near Cleveland, five men described as anarchists plotted to blow up a bridge with fake plastic explosives provided by an undercover agent. The men were arrested when one of them tried to "detonate" the fake bomb with a cellphone.

— In 2009, four men were arrested for scheming to blow up New York City synagogues with remote-controlled bombs and shoot down military cargo planes with heat-seeking missiles. An informant provided the men with fake bombs and an inert shoulder missile launcher.

THE RESULTS:

Defense arguments have repeatedly failed with judges, and the stings have led to many convictions. The Justice Department typically points to communications that they say show the suspect held serious aspirations to commit violence.

But some judges have expressed reservations about the FBI's tactics. In 2011, U.S. District Judge Colleen McMahon in New York said in sentencing one defendant to 25 years in prison that the government "created acts of terrorism" out of fantasies, bravado and bigotry.