BALTIMORE — Rep. Elijah E. Cummings (D-Md.), making his first remarks in public since President Trump launched a Twitter attack on Baltimore, sought to defend his hometown Saturday and urged that investments be made in the city.

Cummings, speaking at the opening of a park, said he doesn’t have time for people who trash the city but does have time for its children.

After his remarks, Cummings told reporters he would like for the president to visit Baltimore but declined to speculate on what Trump was thinking when he issued his tweets.

“When I hear criticism by anybody about my city, I think the thing that bothers me most is that we have a situation where there are folks who are stepping on the foot, on the hope of our children,” Cummings said. “I don’t know what I would have done if I’d had people in high places when I was a little boy telling me what I couldn’t do. Instead, I had people telling me what I could do.”

Cummings said he wants the people of Baltimore to embrace hope.

“It gives people light — it brings light into their lives. I have so much to do,” Cummings said. “Most of the time, I’m in this community and other communities like it trying to create opportunities for our young people.”

A day earlier, Maya Rockeymoore Cummings, chairwoman of the Maryland Democratic Party and Cummings’s wife, blasted Gov. Larry Hogan (R) in a newsletter to supporters, describing the governor’s responses to Trump’s tweets on Baltimore as “half-hearted” and “unacceptable.”

In the email sent to supporters late Friday, Rockeymoore Cummings said Hogan and Trump “are two sides of the same coin when it comes to marginalizing under-served communities.”

She criticized Hogan for policy stances she said have hurt Baltimore, including refusing to release budgeted money to pay for summer jobs for teens and for redevelopment in distressed areas. She also lambasted his 2015 decision to cancel a long-planned $2.9 billion Red Line light-rail project. The state had to return $900 million in federal money allocated to the project.

Hogan said previously that the light-rail project was too costly. While the governor has said he supports some initiatives the Democratic-controlled legislature tried to fund, he said the money needed to be saved in case of an economic downturn.

A spokesman for Hogan, Michael Ricci, said in a written statement that the governor’s administration had committed “an historic $6.7 billion in local aid to Baltimore City, including record funding for education.”

“We work closely with city officials every day on everything from taking violent criminals off the streets to removing blight and revitalizing communities,” Ricci said.

Ricci said Rockeymoore Cummings’s credibility has been in question since she cast Hogan as a white nationalist.

Several elected officials across the state criticized the governor for his initial response to Trump’s tweets a week ago. Hogan’s spokesman released an initial statement saying that “more attacks between politicians aren’t going to get us anywhere.”

Since then, the governor has described as “outrageous and unacceptable” Trump’s tweets calling Baltimore a “rodent infested mess” and a place where “no human being would want to live.”

In national television appearances this past week, Hogan said he wanted to figure out ways to fix Baltimore’s problems, rather than engage in a Twitter war.

Rockeymoore Cummings also took aim at Trump, calling his tweets “outrageous and offensive.”

She said that the president not only defamed “a great American city” but that “he’s nakedly using racism as a political strategy” to win reelection.

The round of tweets started the morning of July 27, when Trump tweeted that Cummings’s district is more dangerous than the U.S.-Mexico border, calling it the “Worst in the USA.”

Cummings, chairman of the House Oversight Committee, defended himself a few hours later, tweeting that it is his “moral duty to fight for” his constituents.

On Tuesday, Trump lashed out again as he told reporters that Baltimore residents “living in hell” have thanked him. He did not provide specifics.

On Fox News on Thursday, Hogan said that while Cummings isn’t entirely to blame, the congressman could do more to help.

News broke Friday of a break-in at Cummings’s home, leading Trump to tweet: “Really bad news! The Baltimore house of Elijah Cummings was robbed. Too bad!” The president was later chided by former U.N. Ambassador Nikki Haley and politicians on both sides of the political divide.

Cummings has represented the district since 1996.

On Saturday, the congressman was among those celebrating the Nature Play Space, which was spearheaded by the Druid Heights Community Development Corp.

The park, festooned by the bright hues of plants and murals, stands in dramatic contrast to a house across the street that is boarded up and forlorn.

Richard Edwards, board president of the development corporation, stressed the importance of community involvement. He moved to Baltimore 32 years ago and said he has been involved in the community ever since. He lives about a block away from the new park.

Every other day, he said, he picks up litter on both sides of his street. “I do it because it needs to be done,” Edwards, 58, said.

“If you’re not helping, or you’re not a part of the solution, you are part of the problem,” he said after the event, chocolate chip cookies in hand.

To illustrate, he described his days as a football player. He said his teammates didn’t worry about political affiliations — they were there to win. It’s a way of thinking, he said, that could be applied to today’s politics.

“It seems the whole system is designed to divide people,” Edwards said. “Instead of just saying, ‘You know what, why don’t we just come together as people and try to make decisions that are best for the people?’ ”

William Pumphrey, 54, does maintenance work on houses in the neighborhood. He grew up in Druid Heights but now lives in Glen Burnie, Md. He helped put the finishing touches on the nature area.

“It will bring people together, keep the community moving forward,” Pumphrey said.

As for Trump’s tweets about Baltimore, Pumphrey said, “It is what it is.”

Deb Smith, 65, came to the event partly because a friend’s son helped put it together — and partly because she’s a master gardener.

Smith, who lives in the Lake Evesham neighborhood, said she liked Cummings’s call for hope.

“Instead of tearing things down, we should build them up,” Smith said. “Instead of criticizing, it’s like, ‘What can you do to help? What do you bring to the table?’ ”

Smith, ever focused on the environment and decked out in a shirt with purple butterflies and matching purple flower earrings, cited Baltimore’s Office of Sustainability and its efforts to increase composting as another example of steps the city is taking to move forward.

“We’re not any worse than any other city,” said Smith, who has lived in Baltimore for 25 years. “Let’s talk about the good parts of Baltimore.”

Wiggins reported from Washington.