President Donald Trump's first priority when it comes to Puerto Rico is reminding it of all the debt it owes Wall Street.

This is rich, considering how much Trump loves debt and bankruptcy.

Puerto Rico's debt problems have a long history involving several government missteps.

Reading tweets from President Donald Trump has become less an exercise in policy and more a glimpse at what or who is driving the information the impressionable president is taking in.

That is how we know, based on three tweets on Monday evening about Puerto Rico, that Wall Street owns Trump right now.

Here are the tweets, in case you missed them:

"Texas & Florida are doing great but Puerto Rico, which was already suffering from broken infrastructure & massive debt, is in deep trouble.

"It's old electrical grid, which was in terrible shape, was devastated. Much of the Island was destroyed, with billions of dollars ... owed to Wall Street and the banks which, sadly, must be dealt with. Food, water and medical are top priorities — and doing well. #FEMA"

You'll notice the "top priorities" were mentioned only after the president pointed out Puerto Rico's massive debt, which is owned by a bunch of investors — especially the powerful hedge funds Trump bashed during his campaign.

There are some other non-debt problems Puerto Rico is facing that the president didn't mention:

Puerto Rico's agriculture secretary, Carlos Flores Ortega, says Hurricane Maria destroyed as much as 80% of the territory's crop value.

The Fitch research group BMI estimates the country's gross domestic product will take a 3.5% hit in 2017 and a 2.1% hit in 2018.

The catastrophe-modeling firm AIR Worldwide estimates up to $85 billion in insured damage, to say nothing of uninsured damage.

Trump opted not to tweet about those disastrous humanitarian and economic situations, but the hedge funds, jockeying for a piece of the $70 billion in debt the territory owes, got a shout-out. It seems Wall Street's priorities are at the top of the president's mind right now.

Good for them. What they're in the midst of is not a pretty fight, and it's not an orderly fight. In fact, it's probably a fight that shouldn't exist.

How Puerto Rico's debt got here

The debt problems Trump tweeted about have a long and sordid history.

In January, Treasury Secretary Steve Mnuchin, formerly of the investment bank Goldman Sachs, said during his confirmation hearing that his predecessor, Jack Lew, warned him to keep an eye on a Puerto Rico bankruptcy.

He said that while answering a question from Democratic Sen. Bill Nelson of Florida, who bemoaned the "tragic situation" in Puerto Rico caused "by quirks in the law that I do not understand how they got that way."

"We have to have a plan," Nelson said.

Of course, Mnuchin has no plan for Puerto Rico, despite his assurances at the time. There's just a chaotic debt-restructuring process and a bunch of rich, impatient Wall Streeters.

How the island got into this situation is an interesting story. It was a combination of federal government negligence, a regressive tax structure, and strange legal footing that savvy investors were able to take advantage of.

In 2006, a tax break for manufacturers who set up shop on the island was allowed to expire. Employment fell by about 10% between 2006 and 2010, according to a report by the New York Federal Reserve.

With revenue slowing, Puerto Rico decided to raise billions in debt to finance its government operations. Investors were willing to loan Puerto Rico money, despite the economic warning signs, because it offered high yields, and the island's bonds had attractive tax breaks.

"It was politically favorable for the Commonwealth because they were able to do these things" — like issuing bonds — "and not put the burden on the residents," David Fernandez, a public finance lawyer at Buchanan, Ingersoll & Rooney, told Business Insider in 2015. "They kept doing it and doing it, and the market kept buying and buying. Who wouldn't do that?"

On top of that, business-friendly tax policies for some of the companies that remained on the island allowed multinational giants to pay tax rates of little more than 1%. Microsoft, for example, packages and ships its products from Puerto Rico. Thanks to these policies, it enjoyed a 1.02% tax rate in 2011.

What you end up with is an island raising debt from investors while bringing in little revenue to pay them back.

The problems with this started to surface in 2015, as did the fact that Puerto Rico didn't have a great way to deal with them. You see, unlike, say, Detroit, Puerto Rico — a US territory — doesn't have the option of using the bankruptcy process to discharge its debt.

So what we have is a chaotic government restructuring with Wall Street hedge funds looking to jump each other in line for payment. And those guys don't complain quietly.

I hope you can see the irony of someone who has called himself the "king of debt" and whose companies have gone through bankruptcy six times touching on this topic. During the 2009 bankruptcy of Trump Entertainment Resorts, the company that held his Atlantic City casinos, Trump argued against a clean restructuring and for keeping debt on the books.

Then he and Ivanka basically sacked the company.

I guess he can't sack Puerto Rico, so it'll have to pay up.