In some ways, the 2021 election was similar to last year’s. Lots of Pennsylvania voters chose to cast ballots by mail — about 736,000 as of Tuesday afternoon, something not possible a couple of years ago. And partisan tensions flared at some polls, with debate over the future of the country, even in highly contentious school board races.

But in most ways, Tuesday’s election was nothing like 2020. The glare of the national spotlight on Pennsylvania had faded. Elections officials said the process was relatively smooth and complaint-free. And unlike last year’s record, officials were expecting a low turnout typical for off-year elections.

In one marquee race, Philadelphia District Attorney Larry Krasner was projected to handily win reelection against Republican Chuck Peruto, the expected outcome in a city with seven times as many Democrats as Republicans. But in other races, the night was shaping up as a strong night for the GOP. A little before 1 a.m., New Jersey Gov. Phil Murphy was in an unexpectedly tight battle with Republican challenger Jack Ciattarelli. And minutes later, the Associated Press projected Republican Kevin Brobson would beat Democrat Maria McLaughlin for a seat on Pennsylvania’s Supreme Court.

In perhaps the nation’s highest-profile race — in Virginia, the only state other than New Jersey picking a governor —Republican Glenn Youngkin topped Democrat Terry McAuliffe, who previously held the office.

Both parties will be scrutinizing the results in those and other races for evidence about the views of the electorate as they prepare for the first midterm election of Joe Biden’s presidency next year.

Republicans were hoping to capitalize on Biden’s declining approval ratings, voters’ discontent with rising inflation, and controversy over how race is taught in public schools to win contests in blue states like Virginia and purple ones like Pennsylvania. And such divisions were apparent even in municipal elections.

“The country’s just in such a state,” said Donna Weickel, 77, after she and her husband cast their votes for Republicans in Buckingham Township, Bucks County.

“We gotta quit the woke stuff,” said Bob Weickel, 79. “All that cancel culture — it’s baloney.”

Outside Radnor High School in Delaware County, Scott Sander, 78, said he cast his vote for the Democratic incumbents on the school board. “It’s more important now than ever” to vote, he said. “There’s an assault on democracy, starting with the school board.”

Voters had returned 73% of the more than one million mail ballots requested this year as of Tuesday afternoon, according to the Pennsylvania Department of State, which oversees elections. Under Pennsylvania law, elections officials could not start counting mail ballots until Tuesday morning, so most will be tallied in the days ahead.

Officials reported a quiet day in election court, compared with last year’s thoroughly litigated election. As of 6 p.m., not a single complaint had been filed — a rare occurrence even for a low-key general election, said Democratic election lawyer Adam Bonin.

Said Delaware County elections director Jim Allen: “I don’t think we’re gonna be making any news.”

The highest-profile election in Pennsylvania was for state Supreme Court, where Republican Kevin Brobson and Democrat Maria McLaughlin were running for the seat being vacated by Justice Thomas Saylor, a Republican who will reach the mandatory retirement age this year.

Democrats hold a 5-2 majority on the court, so the balance of power isn’t at stake. In advertising, Republicans used McLaughlin’s Superior Court rulings to portray her as soft on criminals, while Democrats cited Brobson’s decision in a Commonwealth Court case to cast him as a threat to voting rights. There were also elections for three seats on Commonwealth and Superior Court, both intermediate appellate courts.

In the Superior Court race, Republican Megan Sullivan, a former Chester County prosecutor, defeated Democrat Timika Lane, a Philadelphia trial judge, the Associated Press projected.

That the top of the ballot was occupied by low-profile judicial races marked a sharp contrast with Pennsylvania’s 2020 election, in which a record 6.9 million people cast ballots. The state helped deliver Biden the presidency four years after backing Donald Trump.

While turnout always declines precipitously a year after presidential elections, it remained to be seen whether Pennsylvania’s expansion of mail voting would lead to greater voter participation this year, the first municipal general election in which voters could request mail ballots without having to provide a reason.

A state law expanding mail voting took effect last year; the same law also got rid of a so-called straight ticket voting option that allowed people to vote for one party’s candidates without having to fill in each race. That could have an impact on down-ballot races.

Because of a major decline in interest, municipal elections are often determined not by candidates’ attempts to persuade voters but rather by the parties’ efforts to mobilize their core supporters.

State Sen. Sharif Street, vice chair of the Pennsylvania Democratic Party, said he was “praying turnout will be what we need” to deliver statewide judicial seats to Democrats.

“People are starting to get the word that if you care about criminal justice reform we have to be voting for judges. If you’re concerned about education … [or] about women’s reproductive rights, that’s all on the ballot,” he said inside Relish in West Oak Lane, where politicians gathered for the customary Election Day luncheon.

In 2017, the first year of Trump’s presidency, Pennsylvania Democrats won five of seven open statewide judicial seats. They also made historic gains in the collar counties outside Philadelphia, former GOP bastions that helped power Democrats’ success in the 2018 midterms and Biden’s victory last year.

Republicans aimed to claw back some of those local seats Tuesday. In Delaware County, two county council seats were on the ballot — the same ones Democrats won for the first time in 2017. Councilmember Kevin Madden and running mate Richard Womack were in a tight race late against Republicans Frank Agovino and Joe Lombardo. (Womack is the Democratic nominee for a seat being vacated by Councilmember Brian Zidek, who didn’t seek reelection.)

Democrats have a 5-0 majority on the council, so they’ll retain a majority regardless of the outcome.

Democrats also sought to hold on to row offices they won in Chester and Bucks Counties four years ago — like controller and prothonotary — some of them for the first time since the Civil War.

Perhaps the region’s highest-profile race was in Bucks, where District Attorney Matt Weintraub sought reelection as the only incumbent Republican row officer in the four collar counties. Challenging Weintraub on Tuesday was Democrat Antonetta Stancu, a former prosecutor in that office.

Few local elected officials have received as much attention this year as school board members, as districts in Pennsylvania and across the country saw heated debate over mask mandates and critical race theory, a legal framework that dates to the 1970s and examines racism as embedded in institutions. The theory isn’t taught in K-12 public schools, but some critics have used the phrase to describe curriculum or policies they see as emblematic of liberal bias.

Results for all the contested school board races weren’t available Tuesday night. But the elections will test the potency of those issues, especially in suburban areas where both parties are watching how voters respond to the cultural debate.

In Philadelphia’s low-energy election, Krasner was confident he’d win but seemed to acknowledge the outcome was less certain in elections for statewide appellate courts.

“Obviously we are all concerned about the statewide judicial races because we are up against the insurrection and untruths, which is trying to disenfranchise Democrats,” he said while campaigning in West Philadelphia.

In addition to the district attorney’s race, City Controller Rebecca Rhynhart ran unopposed, as did the Democratic candidates for Common Pleas and Municipal Courts.

Outside the Philadelphia region, Pittsburgh was poised to elect Democrat Ed Gainey as its new mayor. And competitive races for county executive in bellwether Erie and Northampton Counties — in the northwestern and eastern part of the state, respectively — were being watched for clues ahead of the midterms.

Staff writers Erin McCarthy, Justine McDaniel, Jonathan Lai, and Max Marin contributed to this article.