PHILADELPHIA — Hillary Clinton made history Tuesday, becoming the first woman to be nominated for president by a major political party when Democrats formally chose her to lead their ticket.

In a state-by-state roll call vote, Democrats put to rest a tougher-than-expected fight between Clinton and Sen. Bernie Sanders of Vermont for the party’s nomination while breaking a symbolic barrier.

About three hours after the nomination became official, her husband, former President Bill Clinton, delivered a folksy address that appeared to try to tackle some of Hillary’s biggest problem spots with voters: relatability, likability and trustworthiness.

Still one of the Democrats’ best speakers despite being out of office 16 years, Bill Clinton was all about humanizing details such as courtship, marriage, child-rearing and the struggles of a typical middle class couple, and even binge-watching lowbrow movies (“Police Academy”). He called his wife, “first and foremost, a mother.”

He also pivoted to contrast her with Republican presidential nominee Donald Trump, calling Hillary “real” and the brash developer “a cartoon.”

“One is real and one is made up,” the former president said. “Everybody gets cartoons. They’re two-dimensional. They’re easy to absorb. Life in the real world is complicated and real change is hard and lots of people think it’s boring.”

advertisement | advertise on newsday

Then, pausing to point and address the delegates, he said: “Good for you, because earlier today you nominated the real one.”

He said his wife had “done more to make positive change when she was 30 than many officials do in a lifetime.”

And, in a retort to criticism that Hillary Clinton represents the status quo, Bill Clinton said she was the “best darn changemaker I ever met.”

It was the keynote speech on the Democrats’ second convention night, an evening that focused on promoting Hillary Clinton rather than blasting Trump.

David Axelrod, former chief strategist of President Barack Obama’s campaigns, said on CNN that Bill Clinton gave Hillary Clinton a “sense of dimensionality that frankly she’s not good at doing” for herself.

Jeffrey Lord, a Trump surrogate and a former aide to Ronald Reagan, said on CNN the effort will fall flat because voters don’t trust her.

Michael Cohen, a top executive at the Trump Organization, told Fox News that Clinton’s team fails to paint her as someone with the interest of others at heart, because “she’s as inside as inside can be.”

At the close of the night, the nominee herself addressed the crowd via video link. She emphasized history in seeking to build support.

“I can’t believe we just put the biggest crack in that glass ceiling,” she said, referring to becoming the first female presidential nominee of a major party.

As the camera pulled back, it showed a scene of her surrounded by young girls. She closed: “I may become the first woman president, but one of you is next.”

advertisement | advertise on newsday

With Trump and Clinton now officially nominated, it marks just the fourth time in American history that the two major-party candidates come from the same state — and the third time it involves two New Yorkers. The last time it occurred, in 1944, Democratic President Franklin Delano Roosevelt defeated Republican Thomas Dewey.

In a show of unity, Sanders closed the voting by moving to suspend the rules and have the record show Clinton unanimously selected.

“I move that all votes, all votes cast by delegates be reflected in the official record and I move that Hillary Clinton be selected as the nominee of the Democratic Party for president of the United States,” Sanders said in what were probably his final remarks at the convention.

But it was not all harmony for the Democrats Tuesday.

After the vote, Sanders delegates from a handful of states walked out in protest. Some marched to a media tent just outside the Wells Fargo Center and staged a sit-in. Some had tape over the mouths, symbolizing they felt they had been silenced.

advertisement | advertise on newsday

Further away, along the gates near the arena parking lots, Black Lives Matter protesters chanted, “Don’t vote for Hillary. She’s killing black people.”

Earlier Tuesday morning, Sanders told his supporters: “It is easy to boo. But it is harder to look your kids in the face who would be living under a Donald Trump presidency.”

Throughout the night, a parade of speakers touted Hillary’s accomplishments.

But some attacked Trump.

Rep. Joseph Crowley (D-Queens) said that while Clinton, as a New York senator, was fighting to secure recovery money for the state after the Sept. 11 attacks, Trump was obtaining $150,000 in federal funds meant to help small businesses.

“It was one of our darkest days. But for Trump, it was just another chance to make a quick buck,” Crowley said, in one of the harshest attacks on the Republican on the second night of the convention.

Former Secretary of State Madeleine Albright said Trump jeopardizes American allies by threatening to pull out of NATO, and has a “strange admiration for dictators,” such as Russian President Vladimir Putin. Albright said a Trump presidency “would be a gift to Vladimir Putin.”

Gov. Andrew M. Cuomo, speaking from the convention floor after announcing New York’s votes for Clinton, said being a central part of the roll call was “a great moment for New York.”

“When you think of Seneca Falls, of now electing the first woman president, it’s a great moment in history, it’s a great moment for New York,” Cuomo said.

With Laura Figueroa and Emily Ngo