Though Mr. Obama never mentioned Mr. Trump by name he alluded to the caustic political environment that has characterized a significant portion of the president’s tenure.
“What we can’t have is the same old politics of division that we have seen so many times before, that dates back centuries,” he said. “Some of the politics we see now, we thought we put that to bed. I mean, that’s folks looking 50 years back. It’s the 21st century, not the 19th century.”
Mr. Obama sought to frame the New Jersey race and Mr. Murphy’s election on Nov. 7 as an opportunity to right the course in a country that he saw as faltering in its role as an example to the world.
“The world counts on American having its act together,” he said. “The world asks what our values and ideals are and are we living up to our creed. And just as the world is looking to us, in 19 days the world is going to be looking at New Jersey.”
He spoke briefly of his administration’s accomplishments – “By the way, we covered a whole bunch of folks with insurance, too.”
The president, by turns, focused on politics and personal stories, sharing recollections of meeting Mr. Murphy and his wife, Tammy, at the White House, when Mr. Murphy talked about the possibility of running for governor.
“Michelle said, ‘Are you sure?’”
He offered a bit about what he has been doing with his free time: watching the baseball playoffs as he made an allusion to the New York Yankees three straight victories in the playoffs, calling Aaron Judge, a key player for the Yankees, a “big boy.”
He also encouraged voters to stay energized despite Mr. Murphy’s significant lead in the polls.
“You can’t take this election, or any election for granted,” he said and then paused before continuing. “I don’t know if you all noticed that.” They reacted with some laughter followed by muted sighs.
When it was his turn to speak, Mr. Murphy was more blunt in criticizing Mr. Trump’s record. He alluded to Mr. Trump’s decision to end a program launched by Mr. Obama that protected young undocumented immigrants from deportation and said, “Dreamers, and we’ve got 22,000 in this state, are every bit as American as our four kids and are being shown the door.”
Mr. Murphy added that “governors will never have mattered more” in the Trump era, promising that he would stand up to the president.
Other speakers were even more blunt.
“We will not let Trump and the Republican Party erase President Obama’s legacy,” said Representative Frank Pallone Jr., a Democrat and one of three congressmen sent out early to whip up the crowd.
Mr. Obama clearly enjoyed the adulation that he received.
“Boy, do we miss you Mr. President,” Mr. Murphy said in his introduction.
Or as one audience member shouted, above the din of the crowd, “I love you!”
Mr. Obama had a familiar refrain.
“I love you back,” he shouted.