South Africa's special investigations unit has criticized the police after two of its agents were arrested as they were about to catch a drug smuggler
As a result, the smuggler was able to enter the country through Johannesburg International Airport unhindered.
Police blamed the bungle on the failure of the special unit - known as the Scorpions - to inform the police of their planned operation at the airport.
A court dismissed charges against the Scorpions' officers on Monday.
The Scorpions say they were ready on Saturday to arrest a man carrying cocaine worth 5m rand ($700,000), after a three-month investigation.
"We've lost our target and control of the syndicate," said Gerhard Nel, head of the Scorpions in Gauteng province, told The Star newspaper. "We'll have to start again."
Police spokesman Sean Tshabalala said the police had acted within their rights in arresting the Scorpions' officers on suspicion of themselves being involved in a smuggling ring.
"The police and the Scorpions are supposed to be partners in the fight against crime, but if they come into an area controlled by the police, they will have to inform us of their presence, and they didn't do that in this case."
When the arrested officers appeared in Kempton Park Magistrates' Court on Monday, prosecutor Wollie Wolmarans dismissed the case, saying they had followed the correct procedures in their operation at the airport.
The Scorpions were established in 1999 in an effort to control South Africa's high levels of serious organised crime. Initially the unit answered directly to the prosecution service and the minister of justice rather than to the police.
More recently, the question of the Scorpions' independence from the South African Police Service has been a controversial one.
Following a judicial inquiry, measures have been introduced intended to improve co-operation between the Scorpions and the police.
Scorpions 'drug-smuggling' case struck from roll
South Africa says no shakeup of scorpions crime unit
Scorpions target South African crime