A court in Germany has overturned guilty verdicts against two men who smuggled large amounts of Ecstasy from the Netherlands at the behest of undercover police officers.

The Federal Court of Justice ruled Wednesday that the men's criminal action was solely the result of threats and pleas from undercover agents.

Authorities had declined to let the agents testify in court at the trial in 2013.

The federal court decision is the first time that a German criminal case has been canceled because of the actions of agents provocateurs.