(CNN) -- By a 5-4 conservative majority vote, the Supreme Court on Tuesday blocked a lawsuit over the federal government's sweeping electronic monitoring of foreigners suspected of terrorism or spying.