Follow CBSDFW.COM: Facebook | Twitter

WASHINGTON (AP) – Hillary Clinton emerged from New York’s presidential primary closer to clinching the Democratic nomination and becoming the first woman to reach that milestone. Republican Donald Trump strengthened his own path to the general election with a commanding victory, but has little room for error in the states ahead.

The front-runners now hope to replicate their strong showings in New York in the cluster of Northeastern states next up on the primary calendar. Clinton was scheduled to spend Wednesday campaigning in Pennsylvania, while Trump had a rally planned in Maryland, as well as Indiana.

Following her win in New York, a jubilant Clinton made clear she was moving past her unexpectedly competitive primary battle with Bernie Sanders and setting her sights on the general election.

“The race for the nomination is in the home stretch, and victory is in sight,” Clinton declared to cheering supporters. She mentioned Sanders only briefly as she appealed for support from his loyal backers, and saved her toughest talk for Trump and Texas Sen. Ted Cruz, deeming both “dangerous” for America.

Trump, too, is eager to move past the Republican primaries. With at least 89 of New York’s 95 delegates in hand, he insisted it was “impossible” for any of his rivals to catch him and warned party leaders against trying to take the nomination away from him at the convention.

Ohio Gov. John Kasich won at least three New York delegates; Texas Sen. Ted Cruz was in danger of getting shut out. Neither has a mathematical chance of clinching the nomination before the Republican convention in July, though they hope to block Trump’s path and overtake him at the GOP gathering.

Cruz panned Trump’s win in New York as little more than “a politician winning his home state,” then implored Republicans to unite around his candidacy.

“We must unite the Republican Party because doing so is the first step in uniting all Americans,” Cruz said. A freshman senator who has clashed repeatedly with his own party, Cruz has generated only lukewarm support from GOP leaders who see him as the only option for stopping Trump.

Clinton’s triumph padded her delegate lead, putting her 80 percent of the way toward clinching the Democratic nomination that eluded her eight years ago. Appealing to Sanders’ loyal supporters, Clinton said, “There is more that unites us than divides us.”

Exit polls suggested Democrats were ready to rally around whomever the party nominates. Nearly 7 in 10 Sanders supporters in New York said that they would definitely or probably vote for Clinton if she is the party’s pick.

Sanders energized young people and liberals in New York, as he has across the country, but it wasn’t enough to pull off the upset victory he desperately needed to change the trajectory of the Democratic race. Still, the Vermont senator vowed to keep competing.

“We’ve got a shot to victory,” Sanders said in an interview with The Associated Press. However, his senior adviser, Tad Devine, said later that the campaign planned to “sit back and assess where we are” after a string of contests next week.

Of the 247 Democratic delegates at stake in New York, Clinton picked up at least 135 while Sanders gained at least 104.

Trump needed a strong showing in New York to keep alive his chances of sewing up the GOP nomination before the party’s July convention — and to quiet critics who say the long primary season has exposed big deficiencies in his campaign effort.

Having spent months relying on a slim staff, Trump has started hiring more seasoned campaign veterans.

Cruz is trying to stay close enough in the delegate count to push the GOP race to a contested convention. His campaign feels confident that it’s mastered the complicated process of lining up individual delegates who could shift their support to the Texas senator after a first round of convention balloting.

Kasich, the only other Republican left in the race, bested Cruz on Tuesday and is refusing to end his campaign despite winning only his home state.

Trump’s political strength, though he boasts of drawing new members to the party, has left some Republicans concerned that his nomination could splinter the GOP. Among Republican voters in New York, nearly 6 in 10 said the nominating contest is dividing the party, according to exit polls.

Still, about 7 in 10 New York Republicans said the candidate with the most votes in primary contests should be the Republican presidential nominee

The surveys were conducted by Edison Research for The Associated Press and television networks.

Trump now leads the GOP race with 845 delegates, ahead of Cruz with 559 and Kasich with 147. Securing the GOP nomination requires 1,237.

Among Democrats, Clinton now has 1,893 delegates to Sanders’ 1,180. Those totals include both pledged delegates from primaries and caucuses and superdelegates, the party insiders who can back the candidate of their choice regardless of how their state votes. It takes 2,383 to win the Democratic nomination.

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)