ATLANTA—Democrat Raphael Warnock, the pastor of Rev. Martin Luther King Jr. ’s former church in Atlanta, defeated Republican Sen. Kelly Loeffler in a hotly contested runoff election, making him the first Black American to represent Georgia in the Senate and the first Democrat to do so since 2005.

The Associated Press declared Mr. Warnock the winner, while another Senate runoff race in Georgia between Republican David Perdue and Democrat Jon Ossoff remained too close to call. Democrats need to win both races to take control of the U.S. Senate for the first time since Republicans gained power in 2015.

In an address to the public early Wednesday, Mr. Warnock said, “I am going to the Senate to work for all of Georgia.”

The campaigns of Messrs. Ossoff and Perdue released dueling statements early Wednesday jockeying over the remaining Senate seat. Each campaign maintained that once all the results were counted, each candidate believed they would be declared the winner. “We look forward to seeing the process through in the coming hours and moving ahead so Jon can start fighting for all Georgians in the U.S. Senate,” the Ossoff campaign said. The Perdue campaign said the race was tight but, “We believe in the end, Senator Perdue will be victorious.”

While the fate of the balance of power in the Senate now rests on the Perdue-Ossoff result, Democrats achieved one significant accomplishment: They have demonstrated that President-elect Joe Biden’s narrow win over President Trump in Georgia in November wasn’t a fluke and that the state will become a battleground in future elections.

Attendees watch results come in during a GOP election night party in Atlanta. Photo: Dustin Chambers/Bloomberg News
Mr. Warnock’s victory came as Mr. Trump has alleged widespread voting irregularities in the state, which he lost to Mr. Biden in November by about 12,000 votes, but no evidence of significant fraud has been found after two recounts.

The contests were also held a day before a group of Republican lawmakers—including Ms. Loeffler—are planning to object to the Electoral College vote count during a joint session of Congress, an effort pushed by Mr. Trump as part of his last-ditch bid to overturn the outcome of the presidential race.

Mr. Warnock’s win cuts the GOP majority to 50 seats, while Democrats will hold at least 49 seats. If Mr. Perdue, whose term expired on Jan. 3, can’t hold his seat, a win by Mr. Ossoff would put Democrats in control because Vice President-elect Kamala Harris would cast tiebreaking votes.

The runoffs, held because none of the four top finishers won 50% of the vote in November, drew hundreds of millions of dollars in campaign spending as well as the nation’s political attention for the past two months.

More than three million votes were cast before Tuesday in early in-person voting and mail-in ballots, underscoring the high interest in the two races. Given that attention, the number of people at polling places was said to be relatively light early on Tuesday, in a state where lines at polling stations during high-interest elections have been common. Still, more than one million people voted on Election Day, a state official said.

Democrats were encouraged by the results. DeKalb County—home to a chunk of Atlanta, a Democratic stronghold—saw Election Day voting surpass the turnout on Nov. 3, county officials said.

President-elect Joe Biden and President Trump held dueling events in Georgia, ahead of Tuesday’s Senate runoffs and after Trump pressured state officials to flip the presidential election results. Here’s what the two rallies say about Georgia’s political climate. Photos: Associated Press (2)

In the afternoon, voting also picked up in several Republican strongholds, including Cherokee County. In a briefing to donors Tuesday, GOP operative Karl Rove said he was confident of the turnout, a person familiar with his remarks said. With the results largely counted, the exurbs on the outer ring of the Atlanta area didn’t appear to be delivering margins as large as they have in the past for the GOP candidates.

President Trump weighed in late in the evening, pre-emptively rebuking the specter of late-reporting counties in Democratic areas overcoming Republican leads. “Looks like they are setting up a big ‘voter dump’ against the Republican candidates. Waiting to see how many votes they need?” Mr. Trump tweeted, without providing any evidence of election fraud.

Top Georgia election officials, who are Republicans, have repeatedly said they have run free and fair elections. On Tuesday, they urged Georgians—and all Americans—to have confidence in the outcome. “I can assure you that it’ll be a fair and honest election,” Georgia Secretary of State Brad Raffensperger said on Fox News earlier in the day.

Both parties believed Democrats likely had an advantage in the early vote, making the Tuesday turnout important for Republicans. Mr. Ossoff said he felt confident about Democrats’ chances of winning thanks to party infrastructure that has allowed them to run competitive races, especially after the close but unsuccessful race of the 2018 Democratic nominee for governor, Stacey Abrams. “This is the culmination of many years of work and struggle,” Mr. Ossoff said.

The head of the Americans for Prosperity Action, a conservative political action committee that campaigned for Mr. Perdue in the runoffs, said Tuesday that same-day voting was key.

“We’ve got to make up a lot of ground today,” said Tim Phillips of the Virginia-based group long funded by the Koch family.

The campaigns of Ms. Loeffler and Mr. Perdue said in a joint statement Tuesday that they were encouraged by turnout but urged more of their supporters to get out and vote. “Make no mistake about it: this is going to be a very close election and could come down to the difference of just a few votes in a few precincts across the state,” the pair said.

Election workers in Georgia’s 159 counties were processing the day’s votes as well as absentee and early-voting ballots after the polls closed Tuesday evening. In November, final results took weeks to be certified. With spending exceeding $500 million, the races are among the most expensive Senate contests in history.

Since 1988, Republicans have won every statewide runoff in Georgia except one, in 1998, as Democratic turnout declined more steeply than that of Republicans for the second election, according to a nonpartisan report on the state’s history of runoffs. Democrats are aware of that history and built an unprecedented turnout operation for these runoffs, hoping to best the Republicans’ own aggressive effort.

The races were overshadowed by Mr. Trump’s claims since November that the results of the presidential election—which showed him narrowly losing in Georgia—were false.

He has directed much of his ire at Republican state officials, including Gov. Brian Kemp and Mr. Raffensperger, who launched a statewide hand recount of all five million ballots cast, a process observed by representatives from both parties. That recount found Mr. Biden won. A second recount, requested by the Trump campaign and this time a scan of the paper ballots, also found Mr. Biden won.

Still, Mr. Trump’s efforts to sow doubt about the legitimacy of the 2020 presidential results are finding fertile ground among Republicans in Tuesday’s runoff, according to preliminary results from AP VoteCast, a large survey of voters.

While about three quarters of independents and nearly all Democrats in the survey said they are somewhat or very confident that the presidential votes were counted accurately, only 30% of Republicans said the same.

As voting was under way Tuesday, Mr. Trump, who has criticized fellow Republican Mr. Raffensperger and other state officials after he lost the state, called attention in a tweet to a reported problem with voting machines in Columbia County, near Augusta.

The Georgia secretary of state’s office said a few pieces of equipment, known as poll-worker cards and keys, were programmed incorrectly but that the issues were resolved and voting wasn’t stopped.

The lack of success in efforts to overturn the Georgia results has infuriated Mr. Trump. On Sunday, media outlets obtained a recording of a roughly hourlong conversation the president and advisers held Saturday with Mr. Raffensperger in which the president told the state official that he could face legal action and said he wanted him to find nearly 12,000 votes so he could reverse Mr. Biden’s victory.

The candidates’ closing arguments echoed those in November. Republicans have pledged that Georgia’s Senate seats were “the last line of defense” stopping Mr. Biden and the Democrats from having complete control of Congress and the White House.

Democratic voters in Atlanta said they were hopeful Messrs. Warnock and Ossoff could win following Mr. Biden’s November victory, but some were still skeptical it would mean Democrats could enact whatever legislation they want.

Lamar Person of Atlanta, who is Black, wants Democrats to be able to put forth legislation addressing the use of force by police officers and getting better control over the Covid-19 pandemic, which has hit communities of color particularly hard.

“That’ll all at least be on the forefront…more so than with the Republicans,” Mr. Person said.

Ashley Pearson waited to vote in person on Tuesday at a school in rural Guyton so she could fill out, print and check her ballot, and insert it into the counting machine with her own hands.

The hospitality manager, who is white, considered for a short time not voting in the runoff but said the stakes were too high in Congress on issues she cares about, such as gun rights and funding for law enforcement. “This state is not blue,” she said, of Mr. Trump’s narrow loss here in November.

U.S. Sen. Kelly Loeffler (R-GA) waves goodbye after speaking at a runoff election night party.