WASHINGTON — As Major League Baseball’s top players took the field at the All-Star Game in Minneapolis in July, a covert radar system scanned the sky above the 40,000-seat stadium for what security experts said was an emerging threat to public safety: drones.

Using finely tuned detection programs brought in by the Department of Homeland Security, “Operation Foul Ball,” as it was known, identified several small, commercial drones flying in the area. Some were similar to the quadcopter that crashed on the White House lawn Monday.

But the drone detection system, which was considered one of the most advanced in the country and cost several hundred thousand dollars to operate for just that night, had no way of actually stopping drones from flying into the stadium. There was even confusion about whether one of the drones belonged to ESPN.

Confronted with the system’s cost and limitations, baseball officials decided not to use it for the postseason. But those officials had no warning before a drone hovered over at least one playoff game.