PATERSON, N.J. — President Barack Obama stood on a bridge overlooking the rain-swollen and fast-rushing Passaic River in New Jersey’s third-largest city and said today the federal government would work to rebuild towns recovering from Hurricane Irene’s wrath.

The Passaic, which had washed over the bridge, swept through the once-booming factory town of 150,000, flooding the downtown area and forcing hundreds to evacuate. More than 100 people had to be rescued from the rising waters after the storm.

“You know, it could have been worse. But we should not underestimate the heartache that’s going through a lot of these communities, affecting a lot of families,” Obama said.

In nearby Wayne, the president made his way down Fayette Avenue, walking past flooded homes, the garage doors open. Piles of water-damaged debris littered the curb.

“Everybody’s going to be working hard to help you recover,” Obama told one woman as he hugged her.

The Passaic crested at twice its flood stage at a record 14 feet, depositing debris and muddy water stains on buildings and homes across Paterson.

“The entire country is behind you,” Obama said after viewing the destruction. “We are going to make sure that we provide all the resources that’s necessary in order to help these communities rebuild.”

He pledged to people all along the Atlantic Coast who were affected by Irene that he won’t allow “Washington politics” to get in the way of bringing federal help.

Obama started his tour with a helicopter flight from Newark to Fairfield, a suburb about 10 miles west of Paterson. His motorcade brought him to the residential area in Wayne hit hard by the flooding of the Pompton River, which flows into the Passaic.

While Obama visited the Northeast, federal officials kept close watch on Tropical Storm Lee, which was dumping torrential rains across the Louisiana and Mississippi coasts. That area is still recovering six years after Hurricane Katrina.

White House spokesman Jay Carney said the administration is concerned about what “has been and will be a significant amount of rainfall.”