It depends. Under the Fourth Amendment, the home is sacred and generally, the police cannot enter without at least a warrant, consent, or some sort of exigent circumstance. While the police can ask you for consent, they cannot threaten or coerce you to give it. The United States Supreme Court has held that any consent given to the police or other government official to search must be voluntary, that is, free of duress or coercion. Voluntariness is determined by the totality of circumstances, but sometimes can be really obvious. For example, a police officer may not point a gun at someone’s head and ask for consent to search. In such a case, the person giving consent would clearly be doing so involuntarily and against their own will.

The interesting question is whether the police in your situation already had probable cause to arrest you or the occupants of your home. Police may enter a home if they already have probable cause to arrest that person–but that means they can only enter to make the arrest. Under this theory, they cannot enter for any other purpose, such as to search the home. If they did have probable cause to arrest someone in your home, and they did enter for that purpose, the police can seize any items that they can plainly see and identify as illegal contraband.

So in essence, they must have probable cause to arrest you, that is, they must have personal knowledge of facts and circumstances leading them to the belief that you have committed or are committing a crime. Absent that probable cause, they cannot arrest solely to threaten you to gain consent to search. Such an arrest would not only be illegal, but it would render the consent involuntary. However, if the police do have probable cause to arrest, then they can arrest you and concurrently try to get a search warrant.

Search warrants nowadays have been streamlined by many districts, meaning that in some areas all police officers have to do is to place a call to a judge or magistrate, list out all the reasons why they have probable cause to search your house, and then in a small amount of time (sometimes as low as 30 minutes) a judge will provide them with a warrant. So if the police do have probable cause to arrest, then technically they can hold arrest you for that crime and hold you in jail while they pursue the warrant.

Remember, the key to any consent to search is voluntariness. If the police searched your home based on your consent, and they threatened you to give that consent, I highly suggest you speak to a lawyer right away. If the consent was involuntary, a lawyer may be able to get the evidence seized from your home thrown out of court.