The Supreme Court ruled Thursday that police armed with a warrant can enter homes and seize evidence even if they don't knock, a huge victory for the government and law enforcement agencies.

The 5-4 ruling was decided by the two new members, Chief Justice John G. Roberts and Justice Samuel Alito, and signals the court's conservative shift following the departure of Sandra Day O'Connor.

Click here to visit FOXNews.com's Law Center.

The case tested previous court rulings that police armed with warrants generally must knock and announce themselves or they run afoul of the Constitution's Fourth Amendment ban on unreasonable searches.

Justice Antonin Scalia, writing for the majority, said Detroit police acknowledge violating that rule when they called out their presence at a man's door then went inside three seconds to five seconds later.

"Whether that preliminary misstep had occurred or not, the police would have executed the warrant they had obtained, and would have discovered the gun and drugs inside the house," Scalia wrote.

Click here to read the ruling (pdf).

But suppressing evidence is too high of a penalty, Scalia said, for errors by police in failing to properly announce themselves.

The outcome might have been different if O'Connor were still on the bench. She seemed ready, when the case was first argued in January, to rule in favor of Booker Hudson, whose house was searched in 1998.

O'Connor had worried aloud that officers around the country might start bursting into homes to execute search warrants. She asked: "Is there no policy of protecting the home owner a little bit and the sanctity of the home from this immediate entry?"

O'Connor retired before the case was decided, and a new argument was held so that Alito could participate in deliberations. Alito and Roberts, President Bush's nominees who both joined the court in the last year, supported Scalia's opinion, as did Justices Clarence Thomas and Anthony M. Kennedy.

Hudson's lawyers argued that evidence against him was connected to the improper search and could not be used against him.

Scalia said that a victory for Hudson would have given "a get-out-of-jail-free card" to him and others.

In a dissent, four justices complained that the decision erases more than 90 years of Supreme Court precedent.

"It weakens, perhaps destroys, much of the practical value of the Constitution's knock-and-announce protection," Justice Stephen Breyer wrote for himself and Justices David H. Souter, Ruth Bader Ginsberg and John Paul Stevens.

Breyer said that police will feel free to enter homes without knocking and waiting a short time if they know that there is no punishment for it.

Justice Kennedy, a moderate, joined the conservatives in most of the ruling. He wrote his own opinion, however, to say "it bears repeating that it is a serious matter if law enforcement officers violate the sanctity of the home by ignoring the requisites of lawful entry."

The case is Hudson v. Michigan, 04-1360.