Judge Patricia Seitz said not only must the state drop charges of drunken operation of a jet against pilot Thomas Cloyd, 45, and co-pilot Christopher Hughes, 42, but the state cannot take any other action based on their arrests in July 2002.
The pilots' blood-alcohol results were above the state drunkenness standard of 0.08 percent but below the federal criminal standard of 0.10 percent.
Seitz said the federal government has come to dominate the field of commercial aviation, leaving no room for the state unless there is a loss of life, injury or damage.
A spokesman for the state attorney's office said it would appeal the ruling.
The pilots were at the controls when their Airbus carrying 124 passengers was pushed away from the gate for a Miami-Phoenix flight. At the same time, security guards were reporting that the men smelled of alcohol, and the plane was brought back to the gate.
The pilots were stripped of their commercial licenses.
Attorney James Rubin said he told his client Hughes the news and "of course he was happy." Cloyd's attorney was not available for comment.