WASHINGTON — In two major Federal District Court rulings addressing trade-offs between government powers and individual rights, judges in Oregon on Tuesday upheld a 2008 law permitting warrantless surveillance but struck down a key aspect of the so-called no-fly list that blocks people suspected of terrorism ties from boarding planes.

The rulings were handed down on Tuesday afternoon at the same federal courthouse in Portland. Each resonated with the recurring theme of how to balance civil liberties and national security. But the outcomes, each of which may be appealed, cut in opposite directions.

In the surveillance case, Judge Garr M. King ruled in a 56-page opinion that a 2008 law, the FISA Amendments Act, is constitutional. He declined to throw out the conviction of Mohamed Mohamud for trying to bomb a Christmas tree-lighting ceremony in Portland in 2010, in what turned out to be a sting operation by the F.B.I.

The constitutionality of the 2008 law had never been tested in court before Judge King’s ruling. It allows the government to collect the international communications of Americans without warrants if they are to, from or about a noncitizen abroad who has been targeted for intelligence collection.