Explain jursidiction of "marshalls" and "sheriffs"

This question is mostly in regard to the American Old West, e.g. Tombstone. Wyatt Earp was a U.S. Marshall, a federal government officer. I assume the reason that they had a federal law enforcement officer was because Arizona was still a territory at that time. But at the same time they did have a county sheriff, Johnny Behan, who more or less sided with the Clantons, so that put him at cross purposes with Earp. Therefore you had the county sheriff–who I assume functioned much the same as a county sheriff today–at odds with the Federally appointed U.S. Marshall. How was all that sort of thing sorted out? What were there jurisdictions, actually?

And what do federal marshalls do today? I thought they were federal courtroom bailiffs, but that was about it. Yet, Tombstone has a federal marshall to this day. There was a brief segment about Tombstone on TV last night, and this person was shown, and mentioned as holding Wyatt Earp’s job. But why is he there, when Arizona is no longer a territory?

The US Marshals Service provides security in federal courts, handles transfers of federal prisoners, specializes in tracking fugitives, and protecting federal witnesses, among other stuff. The Marshals were founded in 1789, the same year the Constitution was adopted, making them one of the oldest (the oldest?) law enforcement agencies in the land.

Tombstone’s marshalls are not and were not U.S. marshalls; they were locally elected city marshalls, what other cities call “police chiefs.” The county sheriff was indeed just a sheriff, mainly responsible for law enforcement ouside the city, as well as the jail.

http://www.cityoftombstone.com/marshal.htm

I am not sure this is universally true, but in most cases the sheriff is the senior law officer in a county, which means that all city police chiefs in a county are under the sheriff. Most times this causes little or no problem, partly I imagine because the sheriff is most times under-manned and under-funded. We once had a sheriff who decided to raid a bar inside city limits. He was within his rights to do so, but did not endear himself to the police chief.

In New York City, a marshall is nothing but a glorified debt collector (he’s also the one who breaks down your door and throws your possessions out if you’re evicted) and the sheriff is the law. Example: if your car is impounded for nonpayment of parking tickets, the marshall doesn’t care who shows up to pay the fines. The sheriff will demand you come in yourself, and you’d better have a squeeky clean license and registration, 'cause he’s gonna run them – and if you’ve got outstanding issues, you won’t get your car even if you pay the fines. Welcome to New York…

my father was county sheriff while I was growing up and he was also appointed marshal in one of the smaller towns in the county. It meant he could handle duites in that towns that weren’t strictly part of the sheriff’s office. Jurisdiction issues can be tricky but there’s a sort of understanding that police officers handle situations in a city, sheriff’s officers handle courts, unincorporated areas and those that are incorporated but too small to justify a separate police department, and state officers (highway patrol) handle highways and state capitol duty. Of course, a sheriff’s jurisdiction technically includes the cities within a county and they won’t ignore a situation if they are on the scene.

Los Angeles County used to have separate Sheriff’s Department (law enforcement and jails) and Marshals (bailiffs, process serving) but, in a rare bit of government sanity, merged the two offices a few years back.

As for the U.S. Marhal now, just watch the film version of “The Fugitive”. I’m sure it’s true to life! After all, it’s a movie!