US president Barack Obama has implored Americans to elect Hillary Clinton to the White House, casting her as a candidate who believes in the optimism that powers the nation's democracy and warning against the "deeply pessimistic vision" of Republican Donald Trump.
"America is already great. America is already strong," he told cheering delegates at the Democratic convention in Philadelphia. "And I promise you, our strength, our greatness, does not depend on Donald Trump."
For Democrats, the night was steeped in symbolism, the passing of the baton from a barrier-breaking president to a candidate trying to make history herself.
It culminated with Mrs Clinton making a surprise appearance on stage to greet Mr Obama with a long embrace, an almost unimaginable image eight years ago when they battled for the Democratic nomination.
Mr Obama urged Americans to summon the hopefulness of that White House campaign, before recession deepened and new terror threats shook voters' sense of security.
Though he has six months left in office, his address had the feeling of a political transition. He was emotional as he thanked Americans for sustaining him through difficult stretches.
"Tonight, I ask you to do for Hillary Clinton what you did for me," he said. "I ask you to carry her the same way you carried me."
He vouched robustly for Mrs Clinton's readiness to finish the job he started, saying "no matter how daunting the odds, no matter how much people try to knock her down, she never, ever quits".
Earlier Mrs Clinton's running mate, Virginia senator Tim Kaine, introduced himself to the nation as a formidable foil to Mr Trump in his own right.
With folksy charm, he ridiculed the billionaire tycoon's list of promises and imitated one of the Republican presidential candidate's favourite phrases.
"Believe me!" he said mockingly, as the audience boomed back, "No!"
Mr Obama's vigorous support for Mrs Clinton is driven in part by deep concern that Mr Trump might win in November and unravel his two terms in office. He warned repeatedly early on Thursday that the former The Apprentice TV host was unprepared for the challenges that would await him in the Oval Office.
And Mr Trump fuelled more controversy when he encouraged Russia to meddle in the presidential campaign. On the heels of reports that Russia may have hacked Democratic Party emails, he said, "Russia, if you're listening," it would be desirable to see Moscow find and publish the thousands of emails Mrs Clinton says she deleted during her years as US secretary of state.
The Democratic line-up was aimed at emphasising Mrs Clinton's own national security credentials. It was a significant shift in tone after two nights spent reintroducing her to voters as a champion for children and families, and relishing in her historic nomination as the first woman to lead a major political party into the general election.
The convention's third night was also a time for Democrats to celebrate Mr Obama's legacy. Vice president Joe Biden, who decided against running for president this year after the death of his son, called it a "bitter-sweet moment".
A son of Scranton, Pennsylvania, Mr Biden appealed directly to the working class white voters drawn to Mr Trump's populism, warning them against falling for false promises and exploitation of Americans' anxieties.
"This guy doesn't have a clue about the middle class," he declared.
Mr Kaine also picked up the traditional attacking role of the presidential ticket's number two. He tore into Mr Trump, mocking his pledges to build a wall along the Mexican border, asking why he has not released his tax returns, and slamming his business record, including the now-defunct Trump University.
"Folks, you cannot believe one word that comes out of Donald Trump's mouth," Mr Kaine said. "Our nation is too great to put it in the hands of a slick-talking, empty-promising, self-promoting, one-man wrecking crew."
Liberals, particularly those who supported Vermont senator Bernie Sanders, have grumbled about Mr Kaine being on the ticket, particularly because of his support for "fast track" approval of the Trans-Pacific Partnership trade pact. Several delegates held up anti-TPP signs as he spoke.
In a move aimed at broadening Mrs Clinton's appeal, New York City mayor Michael Bloomberg - an independent who considered launching a third party bid for president - endorsed the Democratic nominee.
A billionaire businessman himself, Mr Bloomberg took aim at Mr Trump's bankruptcies, reliance on foreign factories and other economic experience, saying: "The richest thing about Donald Trump is his hypocrisy."
Former US president Bill Clinton, filling the role of devoted political spouse, joined the crowd packed to the arena rafters in cheering the attacks on Mr Trump.
The core of Mrs Clinton's strategy is putting back together Mr Obama's winning White House coalition. In both his campaigns, Mr Obama carried more than 90% of black voters, the overwhelming majority of Hispanics, and more than half of young people and women.
That coalition was vividly on display in the first two nights of the convention in Philadelphia. Women politicians were prominently featured, along with young activists, immigrants, and mothers whose black children were victims of gun violence or killed during encounters with police.
Gun violence continued as a theme as families of mass shooting victims took the stage. Delegates rose in an emotional standing ovation for the mother of one of the victims in last month's Orlando nightclub shooting, who asked why "common sense" gun policies were not in place when her son died.
"I never want you to ask that question about your child," Christine Leinonen said.