Senate President Peter Courtney moved a step closer to becoming Oregon’s longest-serving legislator with a victory during Tuesday’s primary elections.

Courtney, D-Salem, appeared to fend off his first primary challenge since 1999. He had 65 percentof the vote Tuesday night against Salem resident Joyce Judy in the District 11 race.

Courtney had 2,667 votes compared to 1,421 for Judy as of late Tuesday.

The 74-year-old Courtney will face Greg Warnock of Salem in the general election. If elected in November, Courtney would enter a record 35th year as an Oregon legislator in 2019.

"I still have a lot of energy and fire in the belly and a lot of public service left in me," Courtney said Tuesday night. "Just hook a plow up to me and I'll keep on plowing."

Courtney’s victory was one of three contested Democratic Senate primaries in the Salem area.

In District 10, first-time politician Deb Patterson had a solid lead of over Deb Timothy Graham. Patterson had 87 percent of the vote as of Tuesday night and is projected to face long-time Salem Republican lawmaker Jackie Winters in November.

In District 13, Paul Diller was ahead in Tuesday’s primary with 60 percent of the vote over Sarah Grider. If he wins, Diller would face Republican incumbent Kim Thatcher of Keizer in the general election.

Courtney’s win was the most notable, in part because he had publicly contemplated retirement following the last session.

If Courtney is elected in November to continue representing constituents from northeast Salem up to Woodburn, he will have served for a record 35 years in the Oregon Legislature.

That would move him past W.H. Strayer, who represented Baker County from 1915 to 1946, and Lenn Hannon, who represented Jackson County from 1974 to 2003.

"I'm always surprised when he comes back," said Jim Moore, director of the Tom McCall Center for Policy Innovation at Pacific University in Forest Grove. "I think he sees himself as the voice of history and the institution of the Senate, and until someone steps up and shows they can play that role, I think he'll keep running."

Another reason Courtney’s win was interesting was that it was the first time he'd been challenged in almost two decades.

Judy, a retired software project manager, ran on a platform that echoed the complaints of liberal groups in Oregon who said Courtney had blocked progressive legislation.

Judy pointed to bills such as rent control and making healthcare a fundamental right that passed the House but failed to come to vote in Courtney’s Senate.

But the issue that animated Judy most — and made Courtney the target of a California-based special interest group — was his blocking a vote that would have made Oregon part of the national popular vote movement.

Two groups that advocate circumventing the United States' electoral college system in favor of a popular vote to elect the U.S. president provided Judy with more than $35,000 and some visibility.

Despite the concern on the left, Courtney has defended his practice of bringing bills through his chamber with bipartisan support.

He said that having a primary opponent was different, but that it was becoming the norm in politics.

"I haven't usually had an election in May, so it was different," he said. "But I'm grateful to be chosen. My energy level is there, the desire is there, and the work ethic is there."

Moore said he didn't think the opposition was a serious threat to Courtney in the general election.

"I don't think he'll have any problems winning the general election," Moore said.

DISTRICT 10

Patterson appeared on her way to a win in Senate District 10, garnering 2,226 votes compared to 296 for Graham late Tuesday. The seat represents large parts of west, south and east Salem.

She faces an uphill challenge in trying to unseat Winters, the Senate Minority Leader and a legislator since 1999.

Patterson is a part-time minister and semi-retired health care advocate, who said she began planning her run in November 2016 after President Donald Trump was elected.

“We have to stand up here at the state level for protections of the environment, immigrant’s rights, women’s rights,” Patterson told the Statesman Journal earlier this month.

DISTRICT 13

Diller was ahead in Tuesday's Democratic nomination in District 13, with 2,603 votes compared to 1,815 for Grider. The seat represents Keizer and area to the north, including Sherwood, Tigard and Hillsboro.

If he wins, Diller will face Republican incumbent Kim Thatcher, who has served in the legislature since 2005 and the Senate since 2015.

Diller is a Willamette University law professor who cited transportation problems as an important issue.

“I was motivated to step up and run so that we can provide a different kind of leadership at the state level,” he told the Statesman Journal earlier this month. “We have a lot of problems to address in the state, but I also think there’s a lot of opportunity.”

Zach Urness can be reached at zurness@StatesmanJournal.com or (503) 399-6801. Find him on Twitter at @ZachsORoutdoors.