President Barack Obama leaves after delivering remarks on the economy to students and faculty of the Kellogg School of Management at Northwestern University in Evanston, Ill. (Kamil Krzaczynski/EPA)

President Obama assured an audience peppered with old friends and colleagues that he wasn’t making a campaign or political speech.

And then he did.

In a speech grounded in the economy and the gains it has made in recent years, Obama touched on his goals for issues including immigration reform, education, infrastructure, clean energy, equal pay for women and high-quality preschool. He repeatedly punctuated his views on them with “Let’s do this,” a forward-looking refrain to propel those initiatives — and Democrats — across the finish line in November and for the rest of Obama’s term. The speech came shortly after Obama hit the campaign trail for the first time, appearing at private events for Illinois Gov. Pat Quinn, who is embroiled in a tough re-election fight.

The speech is a return to Obama’s theme of economic populism — one that Democrats have asked him to reprise ahead of the midterm elections.

“I am not on the ballot this fall. Michelle’s pretty happy about that. But make no mistake: these policies are on the ballot. Every single one of them,” Obama said. “This isn’t some official campaign speech or a political speech, and I’m not going to tell you who to vote for — even though I suppose it is kind of implied.”

Obama is technically not a candidate, but he made clear before a friendly audience on his home turf that the midterm elections are as much as a referendum of his time in office and legacy as they are of the current Democratic party.

“This is our moment to define what the next decade and beyond will look like,” he said. “And the decisions we make this year, and over the next few years, will determine whether or not we set the stage for America’s greatness in this new century like we did in the last.”

Speaking before an audience of more than 1,000 people at the Kellogg School of Management at Northwestern University here, Obama lambasted Republicans for failing to help the middle class, saying when the party “actually had to take a stand on policies that would help the middle class and working Americans — raising the minimum wage, enacting fair pay, refinancing student loans and extending insurance for the unemployed — the answer was “no.”

Obama repeatedly veered off his prepared remarks in a nearly hour-long speech. His improv performance involved him throwing barbs at Republicans ahead of November about the economy and health care. “While good, affordable health care might seem like a fanged threat to the freedom of the American people on Fox News — it’s turns out it’s working pretty well in the real world,” he said.

The speech had a homecoming feel to it as an energetic Obama pointed out Illinois Democrats and the work they have done and joked that his no-nonsense former chief of staff Rahm Emanuel, who is now the mayor of Chicago and has a penchant for foul language, is the “the mild-mannered Mayor of Chicago.”