MANCHESTER, N.H. -- Former Maryland governor and potential Democratic presidential candidate Martin O’Malley incorporated the recent unrest in Baltimore into his pitch as he visited New Hampshire on Wednesday, saying the nation has an obligation to rebuild its cities.

O’Malley, a former mayor of Baltimore, said the death in police custody of 25-year-old Freddie Gray was the match that sparked rioting in the city.

But, O'Malley said, “it was not the kerosene itself. The kerosene, if you will, is that hopelessness that fuels the anger, and the extreme poverty that makes extreme violence likely. We have to do better as a people. We have to do better as a country. We have to do more, not less, to rebuild our cities.”

O'Malley said the recent recession and what he described as poor policy choices have left "whole swaths of Americans, particularly in American cities … worse off than they were eight years ago." And he said Democrats are party to blame, for not pursuing a wider stimulus package during the early part of President Obama's tenure.

“I think as a party, one of the failings that we had many years ago was the failure to make investments in our cities when we actually had control of the White House and both house of Congress," O'Malley said. "I think people were ready for not just the stimulus that we did but a stimulus that would have long-term jobs and long-term rebuilding, and we failed to do that as a party. And part of me thinks that maybe we’ve been punished ever since.”

His comments to a throng of reporters followed morning visits to a diner that is a popular stop for politicians and to a technology incubator for start-up businesses.

At the Chez Vachon diner, where O'Malley moved from table to table introducing himself, he also brought up the unrest in Baltimore with a group of 16 men gathered in a back room for a monthly social gathering.

“You all saw the images,” O’Malley said, before arguing that “the mother of all summer jobs programs” would help the city. “When people are unheard, when their country’s economy treats them like they’re unnecessary, like they’re unwanted, like they’re unneeded, this sort of anger erupts.”

The trip to New Hampshire, which includes a house party in Durham later Wednesday, is O’Malley’s first visit to an early nominating state since Gray's death sparked protests in Baltimore. Criticis have blamed O’Malley’s “zero tolerance” policing strategy during his tenure as mayor for eroding trust with poorer communities.

Responding to a reporter, O’Malley said he did not believe his policies contributed to the disturbances. O’Malley said police-involved shootings dropped significantly during his time in office, which ended in early 2007. He noted that most of those involved in the rioting were 5 or 6 years old when he was in office.

O’Malley has said that he plans to announce whether he is moving forward with a White House bid by the end of the month. At several points Wednesday morning, he said he would be making a decision “very, very shortly.” The overwhelming favorite in the Democratic race is Hillary Rodham Clinton; other declared candidates are Sen. Bernie Sanders (I-Vt.) and former Rhode Island governor Lincoln Chafee, who was once a Republican.

O’Malley needled Clinton Wednesday on trade and immigration, two issues on which he has previously sought to draw distinctions.

He told reporters that it remains unclear to him where Clinton stands on the proposed Trans-Pacific Partnership, which he opposes.

President Obama has touted the 12-nation trade and regulatory deal as a cornerstone of his second-term agenda, but it has drawn the opposition of many fellow Democrats, including labor leaders, who argue the chief beneficiary will be large multinational corporations.

The deal suffered a setback Tuesday when supporters in the Senate failed to get enough votes to move forward with consideration of a bill that would allow the deal to be considered under “fast-track” status.

“I’m glad that the Senate slowed it down,” O’Malley said Wednesday. “It’s possible to conclude good trade deals, but I think this one certainly smells like it’s a bad one.”

“I think that whatever opinions people have had in the past about trade, I think we have an opportunity now to re-evaluate this notion that chasing cheap labor abroad or making it easier for corporations to send profits or jobs abroad, whether that’s really good for our country,” he said. “I don’t think it is."

O’Malley was also asked whether he thought Clinton’s embrace last week of several pro-immigration measures was genuine.

He instead cited his own record, which included standing up to the White House last year in the midst of a wave of undocumented minors coming over the border from Central America.

“I said many, many months ago when some were suggesting -- including Secretary Clinton -- that we should return refugee children from Central America summarily back to death gangs and the drug gangs in Honduras and Guatemala,” O’Malley said. “I said that that was inconsistent with our moral principles as a people, that we are a generous and compassionate nation.”