 She granted a permanent injunction to halt it.The ruling, whose effect was stayed pending appellate proceedings, sparked a vigorous political and legal controversy.She declined to rule on the legality of the alleged NSA call database, on state-secrets grounds.