President Donald Trump waves to local residents affected by Hurricane Maria as he helps hand out supplies at a disaster relief distribution center at Calgary Chapel in San Juan, Puerto Rico, October 3, 2017.

NEW YORK — For more than a year, Puerto Rico has clashed with investors who hold slivers of its $73 billion debt, and who have pushed the United States territory to pay up.

On Tuesday, during his visit to the hurricane-struck island, President Trump raised a prospect that could cheer the island's residents but send shudders through Wall Street: Maybe the debt can simply go away.

In an interview with Fox News, Mr. Trump said his administration would help Puerto Rico wipe out the debt to help it recover from the extensive damage left by Hurricane Maria two weeks ago. He did not offer specifics.

More from The New York Times:

Aid Is Getting to Puerto Rico. Distributing It Remains a Challenge

Hedge Fund Sues to Have Puerto Rico's Bankruptcy Case Thrown Out

Puerto Rico Declares a Form of Bankruptcy

"We're going to do something. We're going to get it back on its feet," the president said.

"We have to look at their whole debt structure," he told Geraldo Rivera, a Fox News correspondent, on "Hannity." "You know, they owe a lot of money to your friends on Wall Street, and we're going to have to wipe that out. You can say goodbye to that. I don't know if it's Goldman Sachs, but whoever it is, you can wave goodbye to that."

If Mr. Trump meant the federal government would work to help Puerto Rico have the debt forgiven, that could result in major losses for investors large and small. Still, it is far from clear whether the president or the federal government has the power to do that. And despite the reference to Goldman Sachs, Puerto Rico's debt is held by a diverse universe of investors, including big hedge funds and middle-class Puerto Ricans who thought it would make a safe retirement nest egg.

Reached late on Tuesday, investors who hold Puerto Rico's debt and their advisers said they were taken aback and unwilling to comment. One said it was not clear how seriously they should take the remarks, citing promises like Mr. Trump's so-far-unsuccessful pledge to end the Affordable Care Act, the health care plan passed under President Barack Obama.

Most of Puerto Rico's debt is in the form of municipal bonds, a type of debt governed primarily by state laws — or territorial laws, in Puerto Rico's case — not by the federal government. Branches of the federal government, like the Internal Revenue Service, can step in under certain circumstances, but not simply to "wipe out" the debt.

Puerto Rico's economy fell into recession in 2006 and has never recovered, and the government resorted to heavy borrowing just to balance its budget. In 2015, the governor announced that its economy had fallen into a death spiral and it would not be able to repay what it owed, but there was little agreement with creditors on what to do next.

As a territory, Puerto Rico was not eligible to take shelter in bankruptcy court, and without court protection its creditors began filing lawsuits seeking to enforce their claims. The government came perilously close to running out of cash.

Among other things, it used money from its workers' pension system to pay for operations, leaving a $50 billion hole.

Congress enacted a special law, called Promesa, in June 2016 that put Puerto Rico's finances under a federal oversight board and halted the creditors' lawsuits. The new law also gave Puerto Rico certain bankruptcy-like powers, like the power to reduce debt unilaterally under the supervision of a federal judge.

The federal oversight board has called for a debt moratorium even further reaching than the one Puerto Rico's governor had sought, in hopes of using the savings to rekindle its shattered economy. Experts thought the recovery would take years, but their projections did not include Hurricane Maria and the collapse of the island's power grid.

In the Fox News interview, Mr. Trump praised the "special people" of Puerto Rico but condemned its power grid, which failed during the hurricane, leaving more than three million people without power, communications and in some cases water. Even before the storm, the power authority had been operating under a federal court order for Clean Air Act violations and was reported to have cheated its ratepayers for many years. About $9 billion of Puerto Rico's total debt was issued by the power authority.

"We're going to get the electric going again," he said. "You know, that was a complete wipeout. That wasn't like a couple of poles that came down. That was generating plants. That was a lot of very valuable equipment, but it was equipment in bad shape. But we're going to put it in good shape."