WASHINGTON (Reuters) - President Donald Trump picked a new fight on Thursday with his fellow Republicans, saying congressional leaders could have avoided a “mess” over raising the U.S. debt ceiling if they had taken his advice.

In the latest in a stream of criticisms that could undermine his aims to cut taxes, pass a budget and rebuild infrastructure, Trump sought to blame party leaders if Congress fails to agree to raise the cap on how much the federal government may borrow.

The Treasury Department has said the ceiling must be raised by Sept. 29. If not, the government would be unable to borrow more money or pay its bills, including its debt payments. That could hurt the United States’ credit rating, cause financial turmoil, harm the U.S. economy and possibly trigger a recession.

Trump said he had advised Republican Senate Majority Leader Mitch McConnell and House of Representatives Speaker Paul Ryan to link passage of legislation raising the debt ceiling to a bill on veterans affairs that he signed into law on Aug. 12.

“They ... didn’t do it so now we have a big deal with Dems holding them up (as usual) on Debt Ceiling approval. Could have been so easy-now a mess!” Trump said in Twitter posts.

Recent media reports suggest that Trump’s relationship with McConnell has deteriorated amid repeated attacks by Trump on the Republican Senate majority leader for, among other things, failing to get a healthcare bill passed.

The New York Times reported on Tuesday that McConnell and Trump were locked in a political “cold war,” especially after an Aug. 9 phone call that it said devolved into a shouting match. On the 9th and the 10th Trump assailed McConnell via Twitter, angered by a speech in which McConnell said Trump had “excessive expectations” of Congress.

Trump’s salvo ran counter to efforts this week by the White House and McConnell’s office to play down reports of discord.

A spokesman for McConnell noted the Senate majority leader had said earlier this week, in an appearance with Treasury Secretary Steven Mnuchin, that the debt ceiling would be raised.

McConnell was “unequivocal” about it, said spokesman Don Stewart. He said McConnell mentioned it again on Wednesday in a statement the Senate leader issued about his “shared goals” with Trump.

Ryan, speaking at a town hall meeting on tax reform at a Boeing plant in Washington state, also said Congress would pass legislation to raise the ceiling in time to ensure debt payment.

White House spokeswoman Sarah Sanders denied there was any need to repair ties between Trump and top Republican lawmakers.

“I think the relationships are fine,” she told reporters. “Certainly there are going to be some policy differences, but there are also a lot of shared goals and that’s what we’re focused on.”

Slideshow ( 3 images )

DEADLINES LOOM

Raising the debt ceiling is one of the must-pass measures Congress will take up when it returns on Sept. 5.

Congress will have about 12 working days from its return to approve spending measures to keep the government open. While the budget and debt cap are separate, they are likely to become entangled, with Republican opponents of a debt ceiling increase expected to demand federal spending cuts.

Slideshow ( 3 images )

Trump threatened on Tuesday to shut down the government if Congress failed to secure funding for his long-promised wall along the U.S.-Mexican border. His threat added a new wrinkle to the Republicans’ months-long struggle to reach a budget deal, rattling markets and drawing rebukes from some Republicans.

Democrats, solidly opposed to funding the wall, have slammed Trump over his comments.

Both the spending and debt ceiling bills could pass the Republican-led House by a simple majority vote, but will need 60 votes to pass the Senate, where Republicans hold 52 of 100 seats, meaning they will need some Democratic support.

A respected think tank said in a report on Thursday the government might not have enough money to pay all its bills on Oct. 2 if Washington does not raise the debt cap. The Treasury might not have enough money on that day to make a roughly $80 billion payment that will be due to a military retirement fund, according to the Bipartisan Policy Center.

Moody’s Investors Service said it would consider stripping the United States of its top-notch rating in the event of a default but not over late or skipped payments on non-debt obligations if the government ran short of funds. The warning about a possible U.S. downgrade seemed less dire and narrower in scope than one issued on Wednesday by Fitch Ratings.

SWIPE AT MCCONNELL

Trump has often expressed frustration that Congress has not passed significant legislation since he took office in January, particularly its failure to pass a bill to replace Democratic former President Barack Obama’s healthcare law - something that Trump had promised to accomplish.

“The only problem I have with Mitch McConnell is that, after hearing Repeal & Replace for 7 years, he failed! That should NEVER have happened!” Trump said in a tweet on Thursday, echoing criticisms he made earlier this month.

McConnell offered muted criticism of Trump on Thursday, saying he was “a little concerned about some of the trade rhetoric” by the president, who has repeatedly condemned trade deals he believes are bad for the United States, and by others.

“Trade is a winner for America,” McConnell told Kentucky farmers and lawmakers. “The assumption that every free-trade agreement is a loser for America is largely untrue.”