Philadelphia voters have been electing a sheriff since 1838. Chances are most people still envision a man with a ten-gallon hat and a single-action revolver at his hip, but the position has a very different role than it did 150 years ago.

Modern duties vary widely from one municipality to another, but no county in Pennsylvania runs a sheriff’s department quite like Philly’s.

Most city residents aren’t regularly aware of the department’s 400 or so employees, yet these officers are ubiquitous around town. Their numbers have grown nearly 70 percent over the past decade, at the same time as the department’s budget doubled in size. That’s despite a steady drumbeat of calls to reform the office — or even dismantle it — from government watchdog groups.

Incumbent Sheriff Jewell Williams, who has been dogged by sexual misconduct allegations, is up for re-election this year.

There’s been a growing cohort of voices arguing Williams needs to go, while others view the upcoming Democratic primary as a referendum on the historically scandal-plagued row office itself.

Before you cast your vote on the matter, it’s important to know what the hell the office does.

Officers of the court — and other duties

Think of the sheriff as the law enforcement arm of the city’s sprawling court system. The department performs four main duties:

Transporting inmates to and from county correctional facilities, courtrooms and beyond. If an inmate is being moved, chances are a sheriff’s deputy is behind the wheel.

Serving writs (orders to collect things) and warrants (orders to collect people) signed by county judges.

Acting as security guards for all the county court buildings — and other downtown events.

Holding sheriff’s sales, which are auctions on foreclosed and tax-delinquent properties to collect money for plaintiffs in court cases.

These are often unseen tasks that keep the courts running. Last year the department made nearly 72,000 prisoner transports, auctioned off 7,200 properties and served 8,200 warrants, according to the annual report put together by Williams’ outside communications firm, Cardenas Grant.

But sheriff’s officers are not like other city police. They don’t conduct criminal investigations; they can’t pull you over or search your stuff. In short, their job is simply to carry out court orders.

So does this really need to be its own massive, independently elected office?

In the past, critics have called to reduce the scope of sheriff’s department — citing practices in other cities — by merging some of these duties with other agencies like the police department or the courts themselves.

Instead, the department has grown considerably, despite staggering financial strain on Philly’s checkbook.

Ballooning staff, double the cost

City officials signed off on a $26 million budget for the department for the current fiscal year — double what was appropriated for the sheriff a decade ago. The office also grew from 242 to over 408 employees in that same period.

Dan Gross, a third-party spokesperson for the office, says the growth is largely attributable to serving warrants, a duty the department took over in recent years.

“The Sheriff’s Office does more today than it did in 2009, and also generates far more revenue for the city than it did at that time as well,” Gross said. “The growth was organic and necessary.”

The department reported collecting $61 million in delinquent taxes last year, more than double the $27 million when Williams took office.

Each year, the department seems to expand into new ministerial arenas. After taking office, Williams implemented an asset recovery program to help return excess dollars to homeowners who had properties sold at sheriff’s sale.

Other duties are less clearly tied to the courtroom purview, like gun buyback programs and other public safety initiatives. Per the department’s annual report, the sheriff distributed 11,425 free gun locks to city residents last year in collaboration with City Council President Darrell Clarke.

There’s more manpower in recent years, too, including a newish bicycle unit that is often seen cruising between courthouses in Center City. Gross said these two-wheeled deputies primarily serve as escorts for witnesses and jurors. Sheriff’s deputies have also expanded their jurisdiction within City Hall (which is very much a courthouse). Gross says some 35 deputies are stationed there full-time.

With this increased work, overtime has been a nagging issue at the office — and a source of scrutiny for Williams, who continues to accept campaign contributions from his rank-and-file.

Defending his deputies’ need for overtime pay, Williams told Council last year that they are often assigned to provide extra security for downtown events or demonstrations on a moment’s notice — and the labor costs aren’t directly reimbursed.

“It must be understood that we do not have discretion on when, where or how often we are called out,” Williams said.

No term limits, little oversight

Williams was elected in 2011 as a reformer to absolve his predecessor’s sins. Former Mayor Michael Nutter had called to dissolve the office after then-Sheriff John Green was accused of letting an unauthorized company run his office’s real-estate division for millions in commissions. The contracting arrangement eventually resulted in a federal raid and subsequent conspiracy case. The ex-sheriff beat the charges last year.

Oversight of departmental operations has been essentially been limited to the investigative press corp and audits by the independent fiscal watchdog, the City Controller.

Meanwhile, Green served for nearly 23 straight years thanks to a lack of term limits on the elected office — despite repeated urges to reform and or dismantle the office.

In a 2009 report titled “Needless Jobs,” the nonpartisan watchdog group Committee of Seventy formally called on City Council to pass an amendment revoking elections for sheriff, along with five other row offices. The argument? Philly’s sheriff’s department didn’t do as much as other offices in peer cities, they wrote at the time — and its status as an independently elected row office makes it ripe for cronyism and politicization.

Under Williams’ watch, the department has reportedly continued to award no-bid contracts without oversight, in violation of city policy.

“Those functions can be, and sometimes are, folded into other, non-elected, departments of local government or within the court system,” Seventy wrote.

The civic group wasn’t arguing to completely eliminate the title of “sheriff,” a position still widely upheld everywhere from big cities to tiny counties nationwide. The suggestion was to switch to an appointee system as seen in other cities like New York. They also argued that moving some of the sheriff’s functions on the state-funded court system would help alleviate financial stress on the city.

In 2010, Nutter did abolish one of the most odious of the row offices — the 300-year-old Clerk of Quarter Sessions. He called the move “one more tangible piece of proof that government can be reformed.”

A primary challenge

Williams faces three challengers in the Democratic primary — two of three are ex-sheriff’s deputies themselves.

Rochelle Bilal, president of the Guardian Civic League, has concentrated her campaign on the office’s real estate wing, calling to reduce the number of properties that go to sheriff’s sale and instead help homeowners keep their properties.

Williams’ other challengers have focused on the office’s history of corruption — including the alleged practice of coercing employees into making campaign contributions to their boss. Williams has continued this, which some say is ingrained in departmental culture.

For now, it’s clear the sheriff’s office isn’t going anywhere. And voters, at least for this election, will have to cast a ballot.