After a scare in Michigan last week, Hillary Clinton successfully recaptured momentum in the Democratic primary by dominating in the Midwest, taking more white working-class voters from Sen. Bernard Sanders and allaying fears that she’s destined to lose key swing states such as Ohio in a general election.

Mrs. Clinton was able to turn her 2-point loss to Mr. Sanders in Michigan to a 17-point win in Ohio in Tuesday’s primary election, a dramatic reversal that stopped the Vermont senator’s momentum dead in its tracks.

Mrs. Clinton also won the Midwestern states of Illinois and Missouri — albeit by much smaller margins than the romp in Ohio — and also picked up her expected landslide victories in North Carolina and Florida to complete a five-state sweep of Tuesday’s contests that has all but ended the Democratic race.

In the end, it was her so-called “Southern firewall” that proved to be the real difference. Her massive margins of victory across the South have given her a giant lead in the delegate race — a lead the Clinton campaign now calls insurmountable.

While there was little doubt she’d crush Mr. Sanders in the South, there were questions about whether Mrs. Clinton would lose Ohio, Illinois and Missouri to the senator and, in the process, ensure that the Democratic race would continue a slow slog through the spring and all the way until the party convention in July.

But data show Mrs. Clinton was able to put her stamp on the Midwest largely because she performed much better among white voters in Ohio than she did in Michigan. She won white Ohio voters 53 percent to 47 percent; in Michigan last week, she lost the white vote 56 percent to 42 percent.

Mrs. Clinton also won every income bracket in Ohio, including those making under $30,000 per year. And while she did lose the white vote in Illinois and Missouri, Mrs. Clinton more than made up for it with her usual dominant showing among minority voters.

Analysts say there are other reasons why Mrs. Clinton enjoyed a much different fate Tuesday than she did in Michigan last week.

“They understood what happened in Michigan. It was the trade issue. [Mr. Sanders] beat her on the trade issue, and it hurt,” said David Yepsen, director of the Paul Simon Public Policy Institute at Southern Illinois University and a longtime political writer for The Des Moines Register. “My guess is that the trade issue cut deeper in Michigan” than elsewhere in the Midwest and benefited Mr. Sanders.

Indeed, Mr. Sanders hit Mrs. Clinton hard over her support for NAFTA and other trade deals leading up to last week’s Michigan primary, and the attacks seemed to drive white working-class voters to Mr. Sanders‘ side.

This week, however, the issue played much differently. The Clinton campaign on Wednesday morning circulated surveys showing that Mrs. Clinton won Ohio voters concerned about the negative impact of trade deals by a 10-point margin.

Over the past week, Mrs. Clinton also courted white working-class voters by hitting Mr. Sanders for his 2009 vote against the auto industry bailout, even though Mr. Sanders vehemently maintains he voted only against a funding bill (he’d already voted for the bailout itself) and then only because the legislation also contained money for Wall Street banks.

Moving forward, the Clinton campaign argues the race is all but over. In the memo to reporters, Clinton campaign director Robby Mook stressed that there’s virtually no realistic path for Mr. Sanders to capture the nomination.

“The broad coalition of Democrats supporting Hillary Clinton has given her a nearly insurmountable lead in pledged delegates, and we are confident that for the first time in our nation’s history, the Democratic Party will nominate a woman as their presidential nominee,” Mr. Mook said.

By virtue of her strong margins of victory in both Southern states and in Ohio, Mrs. Clinton’s lead among pledged delegates has grown to more than 300. The Democratic Party awards delegates proportionally based on a candidate’s share of the vote in each state.

When superdelegates are included in the count, her lead grows to more than 750. It takes 2,383 delegates to clinch the Democratic nomination, and she now leads Mr. Sanders 1,599 to 844, according to a Bloomberg tally.

While Mr. Sanders is expected to perform well in upcoming primaries and caucuses in Arizona, Washington, Utah and elsewhere, the Clinton campaign says he still cannot mathematically challenge Mrs. Clinton in the delegate race.

But the senator refuses to give up the race and maintains he’ll stick around until the convention.

“What you will not hear from the political and media establishment is that, based on the primary and caucus schedule for the rest of the race, this is the high water mark for the Clinton campaign. Starting today, the map now shifts dramatically in our favor,” he said in an email to supporters.