BAGHDAD – For nearly a decade, anyone driving through one of Baghdad’s many checkpoints was subjected to a search by a soldier pointing a security wand at their vehicle and watching the device intently to see if its antenna moved. If it pointed at the car, it had supposedly detected a possible bomb.

The wands were completely bogus. It had been proven years ago, even before 2013 when two British men were convicted in separate trials on fraud charges for selling the detectors. The devices, sold under various names for thousands of dollars each, apparently were based on a product that sold for about $20 and claimed to find golf balls.

READ MORE: Iraq PM orders removal of fake bomb-detection wands following deadly Baghdad bombing

Yet the Iraqi government continued to use the devices, spending nearly $60 million on them despite warnings by U.S. military commanders and the wands’ proven failure to stop near-daily bombings in Baghdad.

Story continues below advertisement

It took a massive suicide bombing that killed almost 300 people in Baghdad on July 3 – the deadliest single attack in the capital in 13 years of war – for Prime Minister Haider al-Abadi to finally ban their use.

The reason it took so long is likely the widespread corruption in the government. Iraqis mocked the device from the start, joking that too much aftershave could set off the antenna.

Now there are accusations that plans to start using newly imported explosives-detecting scanners were intentionally held up as part of the political wrangling over which faction – the military or the police – will control security in Baghdad.

Since the wands were banned, soldiers at Baghdad checkpoints largely wave motorists through, occasionally asking for vehicle registrations and driver’s licenses and taking a quick look inside. Plainclothes intelligence agents scrutinize drivers and passengers. Police dogs have been used at some checkpoints, but that has proven to be time-consuming and contributing to traffic congestion.

WATCH: Blast in Baghdad claimed by Islamic State kills six

1:00 Blast in Baghdad claimed by Islamic State kills six Blast in Baghdad claimed by Islamic State kills six

In some places, the wands are still being used – at some checkpoints in Baghdad and in the southern port city of Basra, Iraq’s third-largest city – nearly two weeks after the Baghdad bombing. They also were used across the holy city of Najaf south of Baghdad for at least a week after al-Abadi’s order before they were finally recalled.

Story continues below advertisement

“The withdrawal of the device is continuing, but it’s still in use here and there, for now,” Brig. Gen. Saad Maan, the Interior Ministry’s chief spokesman, told The Associated Press. He said the new vehicles equipped with scanners have been deployed at checkpoints on major roads leading to the capital.

“All this will have a positive impact on Baghdad’s security,” he said.

Officials say the explosives-laden minibus used in the July 3 attack in Baghdad’s central Karradah district started its journey in Diyala province, traveling 50 kilometers (31 miles) to the capital. The vehicle, a type used as communal taxis in Iraq, would have encountered at least half a dozen checkpoints, most of which likely used the wand. Investigators say the vehicle carried a 250-kilogram (550-pound) bomb.

READ MORE: Baghdad suicide bombing death toll rises to 175

Four days after the Karradah bombing, three suicide bombers struck a Shiite shrine in Balad, north of Baghdad, killing 37 people. A series of small bombings also rocked the capital, killing about two dozen people.

When Iraqi security forces first began using the ADE-651 wands, U.S. and British military commanders in Iraq dismissed the devices as useless and counseled the government to stop using them.

Faced with mounting criticism, former Prime Minister Nouri al-Maliki ordered an investigation into the effectiveness of the devices in 2010. The outcome was inconclusive, and they continued to be used.

Story continues below advertisement

The head of the Interior Ministry’s bomb squad department, Jihad al-Jabri, was convicted in 2012 and sentenced to four years in prison for accepting a bribe from the British manufacturers. But the case against him did not address whether the wands were effective. Many Iraqis believe he was a scapegoat to protect more senior Iraqi officials from prosecution.

Politics also may have played a role.

After the July 3 blast, al-Abadi fired the military officer in charge of Baghdad’s security and accepted the resignation of Interior Minister Mohammed Salem al-Ghabban, who was in charge of police.

[graphiq id=”CYdWSHhNVH” title=”Major ISIS Attacks in the Middle East and North Africa” width=”600″ height=”520″ url=” https://w.graphiq.com/w/CYdWSHhNVH” ; link=” https://www.graphiq.com” ; link_text=”Visualization by Graphiq”]

Al-Abadi also ordered an investigation into why nearly 70 vehicles equipped with explosives-detecting scanners that were imported last year were left in Interior Ministry garages and had not been deployed.

Story continues below advertisement

Al-Ghabban had been demanding for months that his ministry be given complete control over security in Baghdad. Al-Abadi had resisted, however, keeping the military in charge. Since al-Ghabban is close to one of the most powerful Shiite militias, his opponents feared his demand aimed to give militias control over Baghdad.

Speaking to the AP, the chairman of parliament’s security and defense committee accused al-Ghabban of intentionally failing to deploy the scanner vehicles as a political ploy.

WATCH: Suicide car bomb kills 125 in Baghdad

2:27 Suicide car bomb kills 125 in Baghdad Suicide car bomb kills 125 in Baghdad

“It’s due to the minister’s demands that security control of Baghdad be given to the ministry,” said Hakim al-Zamli. “If it were given to him, he would use them (the vehicles). If not, he won’t use them.”

Al-Ghabban, in turn, has said he was stymied in attempts to protect Baghdad. After his dismissal, he said al-Abadi repeatedly ignored his proposals for bolstering security. He complained that too many security and intelligence agencies were involved in protecting Baghdad.

Story continues below advertisement

“I wanted the entire security file to be left in the hands of the Interior Ministry so it can be fully accountable,” he said. “My job was emptied of genuine tasks, tools and powers, and became ceremonial.”

Qais Adil Faraj, the father of one of the Karradah victims, blames “corruption” and “treason” among the security forces for the bombing. He said he has no faith in the new security measures in the capital.

“More and more bombings will follow the one in Karradah,” he said. “This government will never maintain security nationwide or even just in Baghdad.”