The average salary for police or sheriff’s patrol officers in May 2016 was $62,760, according to the U.S. Bureau of Labor Statistics.

Of course, pay will vary depending on where you live. Officers in California earn an average of $96,660, according to BLS data, with several metro areas, including San Jose, Napa and San Francisco, paying their police officers over six figures.

Salaries will also fluctuate depending on which agency you join. For example, state governments tend to pay more than local municipalities, the BLS reports.

So now that we’ve got your attention with the salary you could earn, let’s dig into what it takes to actually become a police officer.

A Career as a Cop

The role of the police involves enforcing laws and protecting the public. To do so, an individual will need to undergo rigorous training and will be subjected to an intense hiring process.

While colleges offer degrees in law enforcement-related fields of study, such as criminal justice, many agencies only require applicants to have a high school diploma.

Federal jobs, like working for the FBI or the U.S. Fish and Wildlife Service, are more likely to require applicants to have a college degree.

Candidates typically must be at least 21 years old with a clean criminal background.

In addition to various background checks, potential police officers must pass a basic skills test and a physical exam, which can include completing various exercises, according to LawEnforcementEDU. They’ll also have to undergo medical and psychological evaluations and pass a polygraph test.

Recruits will learn about patrol procedures, handling investigations, writing reports, operating emergency vehicles and the use of weapons and other defensive tactics. Additionally, prospective officers will learn about laws, civil rights and police ethics, the BLS reports.

After graduating from police academy, recruits will still need to undergo in-the-field training. According to The Balance, the entire hiring process could take four months to a year to complete.

Once on the job, police officers can move up the ranks with promotions based on job performance, undergoing additional training or passing written exams.

Though the BLS classifies the job outlook for police officers as slower than average for all occupations, a quick search on Indeed shows hundreds of openings available around the country.

Having a degree, military experience or fluency in another language can greatly improve your chances for employment in this field.

Nicole Dow is a staff writer at The Penny Hoarder.

This was originally published on The Penny Hoarder, one of the largest personal finance websites. We help millions of readers worldwide earn and save money by sharing unique job opportunities, personal stories, freebies and more. In 2016, Inc. 500 ranked The Penny Hoarder as the No. 1 fastest-growing private media company in the U.S.