From President Obama's passionate endorsement of Hillary Clinton to Tim Kaine’s Donald Trump impression, here’s what happened on Day 3 of the Democratic National Convention. (Deirdra O'Regan/The Washington Post)

From President Obama's passionate endorsement of Hillary Clinton to Tim Kaine’s Donald Trump impression, here’s what happened on Day 3 of the Democratic National Convention. (Deirdra O'Regan/The Washington Post)

In an election season in which restive voters of all stripes are frustrated with the status quo, it fell to President Obama on Wednesday to argue for staying the course by giving Democrats a third term in the White House — and that Hillary Clinton is the right person to keep moving the nation forward.

Having spent the first two nights of the Democratic National Convention trying to unify the party behind Clinton, a procession of leading party figures made a sharp pivot to GOP nominee Donald Trump. Over the course of the evening, they questioned his character, his judgment, his business acumen — even his sanity.

Obama offered an American ideal against that bill of particulars against Trump: “Our power doesn’t come from some self-declared savior promising that he alone can restore order. We don’t look to be ruled.”

[Donald Trump once again proves he’s the chaos candidate]

About the onetime rival who became his secretary of state and whose election would burnish his legacy, Obama said: “There has never been a man or a woman more qualified than Hillary Clinton to serve as president of the United States of America.

1 of 62 Full Screen Autoplay Close Skip Ad × Scenes from the third day of the Democratic National Convention in Philadelphia View Photos Follow along as Post photographers document the convention in Philadelphia. Caption Follow along as Post photographers document the Democratic convention in Philadelphia. July 27, 2016 President Obama embraces Democratic presidential nominee Hillary Clinton at the end of the third day of the Democratic National Convention in Philadelphia. Melina Mara/The Washington Post Buy Photo Wait 1 second to continue.

“She will finish the job — and she’ll do it without resorting to torture or banning entire religions from entering our country,” he added.

On Wednesday, the convention also formally nominated Sen. Timothy M. Kaine (Va.) as the Democratic vice-presidential pick. Noting that his eldest child is a Marine who deployed to Europe on Monday, Kaine said: “I trust Hillary Clinton with our son’s life.”

It was the first night in which the Democratic speakers focused heavily on the themes of national security and foreign policy — and their most concerted effort to undermine Trump on issues where he has relentlessly pummeled Obama and Clinton.

Vice President Biden described Trump as “a man who confuses bluster with strength” and someone who “doesn’t have a clue about the middle class.”

[Joe Biden delivered the Donald Trump takedown nobody else could]

A president of resurgent popularity, Obama offered a counterpoint to the near-apocalyptic portrait of the country on display during last week’s Republican National Convention in Cleveland, where Trump accepted his party’s nomination.

“The America I know is full of courage and optimism and ingenuity. The America I know is decent and generous,” Obama said.

President Obama's speech electrified the crowd in Philadelphia on July 28, leaving some with chills and others in tears. (Alice Li,Jenny Starrs/The Washington Post)

He nodded toward the country’s worries and the trauma of recent tragedies.

“We’ve still got more work to do,” the president said. “More work to do for every American still in need of a good job or a raise, paid leave or a decent retirement; for every child who needs a sturdier ladder out of poverty or a world-class education; for everyone who hasn’t yet felt the progress of these past seven-and-a-half years.”

But Obama, echoing some of the upbeat themes that first lady Michelle Obama sounded on the convention’s opening night, gave an address focused on progress, both economic and social, and “a younger generation full of energy and new ideas, unconstrained by what is, and ready to seize what ought to be.”

Clinton took the stage unannounced at the end of the Obama’s remarks, and the two engaged in a prolonged embrace before walking around arm in arm waving to a boisterous crowd.

All of it amounted to a reversal of the two parties’ traditional orientations. Republicans typically claim the upbeat mantra of Ronald Reagan, who famously talked of the United States as a “shining city upon a hill,” echoing the words of Puritan John Winthrop’s famous 1630 sermon, which paraphrased Jesus’s Sermon on the Mount.

The Democrats, on the other hand, often have come across as the party more focused on the nation’s woes and flaws — or as then-U.N. Ambassador Jeane J. Kirkpatrick put it contemptuously at the 1984 GOP convention, the “blame America first crowd.”

Midway through Wednesday evening’s speeches, Tony Fratto, a deputy press secretary in the George W. Bush White House, tweeted: “Watching Democrats talk about America the way Republican candidates used to talk about America.”

For any party to hold the White House for three consecutive terms is a difficult feat, even in rosy times.

Democrats have not done so since before World War II, and only twice since 1828, at the dawn of the modern two-party system. The GOP has done it four times, most recently when Vice President George H.W. Bush won the 1988 election to succeed Reagan.

But it is all the more of a challenge when the vast majority of voters think the country is headed in the wrong direction.

The latest Real Clear Politics average of polls shows that the share of Americans who think the country is on the wrong track is nearly 46 percentage points greater than those who think it is on a favorable course.

That has fueled the anti-establishment mood that delivered the GOP nomination to Trump and made Sen. Bernie Sanders (Vt.) a formidable challenger to Clinton for the Democratic nomination.

As the evening wore on, scattered anti-“TPP” signs popped up around the arena, signaling opposition to the Trans-Pacific Partnership, a pending trade deal championed by Obama but opposed by most congressional Democrats and labor unions.

Kaine has supported the deal in the past but is expected to modify his position to conform with that of Clinton, who as secretary of state called it the “gold standard” of trade deals but is now opposed.

Speeches and videos Wednesday aimed to reinforce Clinton’s governing credentials, particularly on national security. This followed Democrats’ efforts to unify the party on Monday and both humanize and attest to their nominee’s character on Tuesday.

Meanwhile, Democrats were given fresh fodder Wednesday for their argument that Trump is unprepared and temperamentally unsuited to be president.

At a news conference in Florida, Trump pleaded directly with the Russian government to meddle in the U.S. campaign by finding and releasing tens of thousands of private emails from Clinton — a development that alarmed not only Democrats but also many Republican leaders and foreign policy experts.

[Trump invites Russia to meddle in the U.S. presidential race]

Among those called upon to draw contrasts between Clinton’s and Trump’s foreign policy credentials was retired Rear Adm. John Hutson, one of several military leaders in the spotlight at the convention.

“Donald Trump calls himself the ‘law-and-order candidate,’ but he’ll violate international law,” Hutson said. “In his words, he endorses torture ‘at a minimum.’ He’ll order our troops to commit war crimes like killing civilians. . . . This morning, he personally invited Russia to hack us. That’s not law and order. That’s criminal intent.”

Members of the Congressional Black Caucus on Wednesday looked past the Obama era and expressed their faith in Clinton as their standard-bearer and champion. But mostly they delivered a vehement denunciation of Trump, saying he has no plan to lift African Americans.

Rep. Hakeem Jeffries (N.Y.) said Trump is simply “the least-qualified person to ever seek the presidency.” He added a bit of wordplay, saying Clinton had served as secretary of state while Trump is a “secretary of hate.”

In his remarks to the convention, Senate Minority Leader Harry M. Reid (Nev.) chided Trump as “a hateful con man” but also blamed his Republican counterpart, Senate Majority Leader Mitch McConnell (Ky.), for “setting the stage” for Trump.

New York Mayor Michael R. Bloomberg, a onetime Republican turned independent, also urged a vote for Clinton, making a special appeal to his fellow independents.

“The bottom line is: Trump is a risky, reckless and radical choice, and we can’t afford to make that choice,” Bloomberg said, calling Trump a “dangerous demagogue.”

The former New York mayor is also a leading voice for tougher gun laws, a cause that was featured in a segment of Wednesday night’s program. It included an emotional speech by Christine Leinonen, the mother of Christopher Leinonen, who was killed in the massacre last month at an Orlando nightclub.

The presentation also featured speakers with connections to the shootings at Sandy Hook Elementary School in Newtown, Conn., in 2012 and at a church in Charleston, S.C., last year.

Former congresswoman Gabrielle Giffords (Ariz.), who was shot in Tucson in 2011, also appeared alongside her husband, Mark Kelly, a retired astronaut and Navy captain. The two have made it their mission to enact additional gun control measures.

“We have important work ahead of us, work that will determine the future of our country,” said Giffords, who argued for Clinton’s candidacy, saying, “Strong women get things done.”

Former Maryland governor Martin O’Malley, who dropped out of the Democratic presidential race after a dismal showing in the Iowa caucuses, noted that he had competed against Clinton and worked with Kaine when the vice-presidential nominee was governor of Virginia.

“I am here to tell you that Hillary Clinton and Tim Kaine are as tough as they come,” O’Malley said. “They never give up. They never give in.”

O’Malley took aim at Trump, saying he has been “a bully his whole life.”

Kaine’s pick as Clinton’s running mate drew praise from many quarters, but the former Virginia governor faces a challenge in convincing some liberal groups that he will champion their issues. Longtime watchers of Virginia politics say the question during much of Kaine’s career there has been whether he is too liberal for the state.

“I think progressives are looking for him not only to talk about progressive issues, but to talk about them with authenticity and sincerity,” said Stephanie Taylor, co-founder of the Progressive Change Campaign Committee, which bills itself as representative of the “Warren wing” of the Democratic Party, a reference to Sen. Elizabeth Warren (Mass.).

“He has a real chance to introduce himself to the Democratic Party and electorate at large,” Taylor said of Kaine.

Some Sanders supporters had threatened in recent days to walk out of the hall or otherwise show their displeasure with Clinton’s pick of Kaine, a former Richmond mayor, Virginia governor and chairman of the Democratic National Committee. Only a smattering of disapproval could be heard in the hall.

In his address to the convention, Kaine showed that he is warming up to the running mate’s traditional role as the presidential nominee’s attack dog.

He delighted the crowd with his mocking impersonation of Trump, focusing on his verbal tic of saying “Believe me.”

“Folks, you cannot believe one word that comes out of Donald Trump’s mouth. Not one word,” Kaine said, setting off the delegates in a chant of “Not one word.”

Isaac Stanley-Becker contributed to this report.