How does ‘don’t leave town’ work

I’ve seen it in hundreds of films and TV shows. A guy/gal is a person of interest and gets told by the detectives, “you’re free to go but don’t leave town”.

Is that a legal restriction? Do they need to get a warrant or something similar to hold you? Or is just a strong suggestion?

Or does it even happen in real life?

It doesn’t happen in reality. A police officer doesn’t have the authority to restrict your movement like that.

Well, let me add some weasel words here, because there’s always a possibility that a police officer has heard the saying so many times on TV that they think they do have that authority. I’m not going to say it truly never happens, but in reality, they don’t have that authority, and it shouldn’t happen. If a police officer ever tells you that, it’s legally meaningless.

A judge can hand down an order limiting someone’s movements if they are going to trial, but if you aren’t actually charged with anything, I don’t think even a judge can restrict your movement like that.

(I’m an engineer, not a lawyer, etc…)

ETA: Here’s a quote from a real police officer:

Posted here:
https://www.quora.com/What-is-the-meaning-when-a-cop-says-don’t-leave-town

I suppose the implication is “If you try to disappear you’ll look guilty as hell, so if you’re trying to persuade us you’re not, you’d better stick around”.

It’s a story-telling device from suspense dramas. It induces the audience to keep that character more in the foreground.

We’ve got an unexplained death case running here currently, where someone the police want to interview did leave town.

He went to another country, and was with his father when his father died in hospital.

So (1), the police didn’t stop him.

and (2), the press reported that he’d left the country. He’s going to have a hard time living that down.

The only times I know of that your movement can be restricted like that are as a condition of bail and a condition of parole.

Thanks for the replys everyone, especially e_c_g. I guess I shouldn’t be surprised. Still as common as a trope it is I’m a little surprised it has no basis in fact. Ignorance fought.

Yeah, not a legal restriction. At best, it would be a way for the cop to let someone know that they’re keeping an eye on that person, although it’s a less efficient way than saying, “I’m keeping an eye on you.”