HARRISBURG, Pa. — Counting of Pennsylvania ballots continued Friday, with results still unclear for the presidential contest as well as a host of down ballot races, including for some congressional seats and two statewide offices.

Republican Tim DeFoor won the auditor general’s race, making him the first GOP candidate in that job in more than two decades. Republicans kept control of both chambers of the Legislatures.

Election officials are tabulating ballots in a state that held its first general election in which voters did not need an excuse to vote by mail. More than 3 million applied to do so.

The race for auditor general pitted Republican Timothy L. DeFoor, a county controller in central Pennsylvania, against Democrat Nina Ahmad, a former deputy Philadelphia mayor. DeFoor was declared the winner Friday.

DeFoor is Black and Ahmad was born in Bangladesh. In January 2021, the state’s first elected “row officer” of color will begin work.

DeFoor, 58, the elected controller in Dauphin County, which includes Harrisburg, touts his experience as making him uniquely qualified for the office. He has spent three decades conducting governmental audits and fraud investigations for the state inspector general, the state attorney general and a large hospital system.

Ahmad, 61, who has a doctorate in chemistry, had said she wanted to expand the office’s traditional watchdog role so that it also examines how equitably public money gets distributed. She wanted to focus on charter schools and do what she can to expand high-speed internet.

The Green Party candidate for auditor general was Olivia Faison, and the Libertarian was Jennifer Lynn Moore.