John J. McCarthy’s Montgomery County roots run deep. He began working as a county prosecutor here 31 years ago, moved into his home in Rockville 21 years ago, and began serving as the county’s top prosecutor eight years ago.

He is running next year to serve a third term as Montgomery County’s top prosecutor.

The position pays $199,000, a county official said, but that figure will rise to about $203,000 in 2014.

“I love the job,” said McCarthy, a Democrat who ruled out a run for state attorney general.

Reflecting on his last two terms in office, McCarthy said, “I think we put into place exactly what we campaigned on, and told the community what we would do when I ran the first time.”

One example, he said, is combatting gang violence.

McCarthy said his office and other county agencies also have worked hard against domestic violence, with initiatives like the Family Justice Center, the county’s interagency organization for victims.

“I think we have made a significant improvement in the number of homicides,” he said, recalling 2010, when the county did not have any domestic violence-related homicides.

There were four domestic violence-related homicides in 2011, five in 2012 and one in 2013, according to state’s attorney’s office spokesman Ramon Korionoff.

“My objective would be to have zeroes come up in many categories again and again,” he said.

McCarthy said his office has focused on youths and schools.

“I think the foremost thing you can do fighting crime in any community is public education,” he said, citing work in county schools and with senior citizens.

One example, he said, was programs such as Truancy Court, an anti-truancy program the state attorney’s office runs in six schools around the county.

Fighting crime through public education — and keeping kids in school — is an area he wants to keep working on if elected to a third term, he said.

“I think if we expand to serve a greater number of kids,” he said, “I think we will reduce crime and other related behaviors that put kids at risk, which would make for a safer community.”

McCarthy said his office has tried to protect children from threats online through Internet safety training. Anonymous online crimes are harder to prosecute, so education is important, he said.

McCarthy wants to see judicial resources used more effectively on issues such as how officials decide whether someone who is arrested and charged with a crime needs to stay in jail before trial or how public safety and state officials deal with drug cases stemming from marijuana.

“We’ve been dealing with [marijuana] as a health education issue for a decade in Montgomery County ... because that’s the reality how we’re dealing with it. Should it be decriminalized and be a fine civilly and then put into education? I think that’s a conversation we should be having,” he said.

As of Tuesday, McCarthy was unopposed.

McCarthy and the other candidates for courthouse offices, such as register of wills, sheriff and clerk of courts, have held one joint fundraiser so far, he said. His campaign currently has about $80,000 cash on hand.

He said he expects to hold another fundraiser in late January or February and raise about $100,000 by the general election next November, he said.

The primary will be held in June 2014.

When he isn’t working, McCarthy, 61, a father of four, works out and plays basketball at Montgomery County’s Public Safety Academy. His office is decked with trophies, photos and hats from various sports teams.

And he carves out time to watch his son, Matt, play basketball.

“You can have me 24 hours a day, seven days a week, 365 days a year, but four hours a week, you can’t have me,” he said with a laugh.