NORTH LAS VEGAS, Nev. — President Obama on Sunday savaged Representative Joe Heck, Republican of Nevada, for failing to reject Donald J. Trump earlier in the presidential race, seeking to tarnish Mr. Heck and other Republican candidates across the country by association with a standard-bearer he called indecent and unfit for the presidency.

Speaking at a high school here as he began a three-day campaigning and fund-raising trip, Mr. Obama portrayed Mr. Heck, who is in a competitive Senate race that could determine control of that chamber, as having helped enable Mr. Trump’s rise by endorsing his breed of divisive politics. Only now, with Mr. Trump’s campaign foundering, is Mr. Heck willing to abandon him, the president said.

“I understand Joe Heck now wishes he never said those things about Donald Trump,” Mr. Obama told several thousand people, noting that Mr. Heck had said he had “high hopes” that Mr. Trump would become president and thought he was fit to have control over the nuclear codes. “But they’re on tape, they’re on the record, and now that Trump’s poll numbers are cratering, he said, ‘I’m not supporting him’? Too late! You don’t get credit for that.”

In wading so aggressively into the Nevada race, in which Mr. Heck is vying against Catherine Cortez Masto, a Democratic former state attorney general, to succeed Harry Reid, the retiring Senate Democratic leader, Mr. Obama was working to broaden his argument against Mr. Trump into one that can sully a large number of Republicans.