Republican Donald Trump leveraged anxieties about the cost of living and illegal immigration to defeat Democratic Vice President Kamala Harris, reclaiming the White House in a victory certain to alter America’s priorities and economic relationship with the world.

Trump, who won election in 2016 as the 45th president, now will be the 47th and just the second candidate in U.S. history to win nonconsecutive White House terms.

He asked voters to consider if they were better off under his first presidency as Harris struggled to distance herself from an unpopular President Biden during a combative and expensive campaign that exposed the nation’s deep partisan divisions.

The victory cements Trump as a historic political figure who prevailed despite a brashness and unfounded claims of election fraud that alienated many, proving his surprise 2016 victory over Democratic nominee Hillary Clinton wasn’t a fluke.

Harris made it a more competitive race after she assumed the Democratic nomination following Biden’s decision to drop out. The president stepped aside after a faltering performance in a June 27 debate with Trump that heightened questions about Biden’s age, 81, and mental sharpness . Trump had held a commanding lead in polls over Biden, but Harris, looking to become the first woman to hold the nation’s highest office, quickly narrowed the gap.

Democrat candidate, U.S. President Joe Biden, and Republican candidate, former U.S. President Donald Trump, attend a presidential debate in Atlanta, Georgia, U.S., June 27, 2024. REUTERS/Brian Snyder

Now Trump, 78, who rose to fame as a flashy New York City real-estate mogul and reality-television star, will become the oldest person ever elected president—a few months older than Biden was when he won in 2020.

Grover Cleveland, a New York Democrat, is the only other  former president to win the White House after an earlier re-election defeat, claiming the second victory in 1892.

Sen. JD Vance , 40, will be the next vice president. The junior senator from Ohio showed a talent for articulating the tenets of Trumpism, often with more discipline than the movement’s leader and is likely to be a top future contender for the GOP nomination. A constitutional limit means Trump will need to vacate the White House in four years.

The outcome of the race caps a summer and fall campaign season of unprecedented upheaval, with Trump surviving two assassination attempts . All the while, Trump campaigned even as he worked through many legal problems, including being indicted on federal election-interference charges (he pleaded not guilty) and being found guilty in a state court on 34 felony counts for falsifying records to cover up hush money paid to a porn star.

Republican presidential candidate and former U.S. President Donald Trump gestures with a bloodied face while he is assisted by U.S. Secret Service personnel after he was shot in the right ear during a campaign rally at the Butler Farm Show in Butler, Pennsylvania, U.S., July 13, 2024. REUTERS/Brendan McDermid/File Photo

His victory throws the election-interference charges and another federal case into doubt as Trump now could follow through on a threat to fire special counsel Jack Smith and have the prosecutions dropped. The win is likely to throw a wrench into Trump’s sentencing later this month in Manhattan, and is expected to hamper a Georgia prosecutor’s efforts to pursue racketeering charges alleging that Trump engaged in a criminal conspiracy to overturn the state’s 2020 election results.

Sour mood

Trump benefited from a sour voter mood, despite low unemployment. In the final Wall Street Journal poll before the election, almost two-thirds of voters said the nation was headed in the wrong direction. While the rate of inflation has been coming down, its pain provided a long hangover that boosted Trump and hurt Harris.

Over the course of his nearly decade on the national political stage, Trump has reshaped the GOP’s tone , making it more populist and less tied to the traditional conservative ideals of fiscal discipline and national-security hawkishness. Those changes, with resonance from local party officials to Congress, are certain to influence Washington’s priorities over the next four years.

For all that he transformed in the GOP, Trump’s arguably strongest appeal echoed Ronald Reagan. “I’d like to begin by asking a very simple question,” he began an Oct. 27 speech at Madison Square Garden in New York City. “Are you better off now than you were four years ago?”

On the stump, Trump used harsh, often derogatory language that some Republicans feared would make it more challenging for him to win over those outside his base. His campaign faced backlash even from Republicans for the Madison Square Garden event, during which some speakers made racist, sexist or otherwise derogatory comments about Harris, Democrats, Puerto Ricans and immigrants. Rallies such as the one at the Garden provided much fodder for his critics, but they also were his biggest venue to connect with his adoring fans—many of whom said his unconventional political tone and style were what they liked most about him.

president

Democrats had the spending advantage in the race, as they did when Trump first won in 2016. He benefited from a major late investment in time and money by Elon Musk . The Tesla chief executive, who campaigned with Trump, has donated at least $118 million and is expected to get a role helping the new administration cut government costs.

Both candidates closed their campaigns on messages infused with fear. Harris called Trump a “fascist,” highlighted former aides who said he shouldn’t again be allowed in the Oval Office and argued he had hurt women’s reproductive health because of the Supreme Court appointments of his first term. Trump suggested Harris was personally responsible for inflation and undocumented migrants who have committed crimes after entering the U.S.

The two candidates debated once , with Harris suggesting more face-offs after she put him on the defensive in the fiery event by provoking him over crowd sizes at his rallies and his felony convictions.

president

The outcome leaves the Democratic Party in disarray, with neither Biden nor Harris positioned to serve as a leader and with large doses of second-guessing and recriminations certain to come.

Bitter divisions

When sworn in on Jan. 20, Trump will preside over a government he has called corrupt and untrustworthy. He will inherit a bitterly divided country still recovering from the aftershocks of a global pandemic, pained by years of inflation and increasingly locked in tribal politics.

As he did during his 2016 bid, Trump in 2024 painted a bleak picture of the nation’s trajectory, casting himself as the only one able to fix it. He said he could solve many of the nation’s problems in short order—sometimes just with a phone call. In his first administration, that often didn’t prove to be the case.

president

Supporters listen to Republican presidential nominee and former U.S. President Donald Trump speak during a campaign rally in Rocky Mount, North Carolina, U.S., October 30, 2024. REUTERS/Brendan McDermid

Trump has said he would push through stiff tariffs to get better trade deals and influence the foreign policy of other nations. During his previous term, his aggressive approach toward China was underscored by tariffs that plunged the two nations into a trade war that rattled global markets.

He has said he could bring about quick ends to both the conflict in the Middle East and the Russia-Ukraine war, while also saying he would reduce government regulation. undefined undefined When Trump left the White House in early 2021 after being beaten by Biden , he was unsure what his post presidency would look like, though he wanted to remain the leader of the party he had transformed. Unlike most who leave the office, he didn’t immediately start raising money for a presidential library, a sign he was plotting a return. undefined undefined The former president never dropped his false claims that the 2020 election had been rigged against him, ignoring dozens of court rulings and the advice of some around him to not talk about it so much. After leaving office, Trump also became more defiant about the Capitol riot on Jan. 6, 2021, saying he hadn’t instigated it and describing hundreds of his supporters who were arrested as political prisoners and “patriots.”

He made himself a candidate again just a week after the 2022 midterm election, trusting his gut that base voters were with him even if establishment Republicans weren’t . Their reluctance followed the party’s subpar performance in that year’s balloting after he heavily involved himself in primaries. Instead of cowering under four criminal indictments, he embraced them—slapping his mug shot on T-shirts and generating campaign cash and party loyalty by presenting himself as a victim.

Former U.S. President Donald Trump attends the trial of himself, his adult sons, the Trump Organization and others in a civil fraud case brought by state Attorney General Letitia James, at a Manhattan courthouse, in New York City, U.S., October 2, 2023. REUTERS/Brendan McDermid/Pool

Just more than a year into his third White House bid, the veteran of the real-estate boom-and-bust cycle had navigated the ups and downs to emerge more formidable than ever after starting the race looking his weakest since stepping onto the national political stage.

He had surrounded himself with a more experienced campaign team. His aides were significantly more disciplined than the candidate, whose speeches grew more meandering.

Throughout his campaign, he deepened divisions by pushing dark rhetoric and repeatedly threatening retribution for his political enemies . He routinely departed from political traditions, including declining to release any detailed medical or financial records as nominees of both parties have traditionally done.

In his acceptance speech in July at the Republican National Convention in Milwaukee, Trump—who has often hit divisive tones but at times has called for unity—made a pledge: “I am running to be president for all of America, not half of America, because there is no victory in winning for half of America,” he said.

The next four years will test that promise.

Republican presidential nominee and former U.S. President Donald Trump walks at a campaign rally in Rocky Mount, North Carolina, U.S., October 30, 2024. REUTERS/Brendan McDermid

Write to John McCormick at mccormick.john@wsj.com and Alex Leary at alex.leary@wsj.com