NEW YORK (Reuters) - A potential standoff over the U.S. federal debt ceiling is raising alarm bells among fund managers who fear a repeat of 2011 when a protracted showdown over increasing the government’s borrowing limit and subsequent downgrade of U.S. credit quality led to a more than 15 percent slump in the S&P 500 stock index.

A street sign for Wall Street is seen outside the New York Stock Exchange (NYSE) in Manhattan, New York City, U.S. December 28, 2016. REUTERS/Andrew Kelly

U.S. investors are raising cash and buying protection, bracing for a messy fight ahead of the Treasury Department’s Sept. 29 deadline to raise the debt limit, a legal cap on how much the U.S. government is allowed to borrow.

Failure to increase the debt ceiling could lead to a recession and prompt the first significant sell-off of the Trump administration. The benchmark S&P 500 has not fallen by 5 percent or more in over a year, the longest streak without such a decline in more than 20 years.

Federal efforts to clean up the devastation after Hurricane Harvey battered Texas have decreased the probability of a federal government shutdown to 35 percent from 50 percent two weeks ago, according to Goldman Sachs, as the legislation could be packaged into a larger disaster relief bill.

Yet the danger still remains, Goldman warned in a Tuesday note.

“A delayed debt ceiling hike is still clearly possible,” Goldman strategists wrote. “The president continues to raise the possibility of a shutdown if the border wall is not funded, and the upcoming extension of spending authority is likely to be temporary, potentially pushing the risk of a shutdown later into the year.”

Fund managers say they are not confident that a debt ceiling agreement will be passed as quickly as the broad market expects.

“You’ve got a political environment that is very contentious, not just left versus right but within the Republican Party itself,” said Jeff Klingelhofer, a co-portfolio manager of the $1.1 billion Thornburg Strategic Income Fund.

“If the rhetoric increases it will spook markets and we are taking risk off the table” by raising cash and lowering the credit duration in their bond portfolios, he said.

David Ader, chief macro strategist at Informa Financial Intelligence, said Treasury bills for October are about 10 basis points higher in yields than they normally would be, owing to debt-ceiling concerns. “People are avoiding them,” he said.

President Donald Trump criticized congressional Republican leadership for not tying the debt ceiling increase into a bill that made it easier for the Department of Veteran Affairs to fire employees for misconduct, calling the situation a “mess” in an Aug. 24 tweet.

When asked about the possibility of attaching debt ceiling legislation to a relief bill for the victims of Harvey, U.S. Treasury Secretary Steven Mnuchin told the Wall Street Journal on Thursday: “At the end of the day, I just want it raised.”

The stock market has so far shaken off concerns this year ranging from increasing tensions over North Korea’s missile tests to ongoing investigations into Russia’s efforts to influence the 2016 U.S. presidential election as U.S. corporate profits have jumped. As of Aug. 29, 73.6 percent of companies in the S&P 500 reported earnings above analyst estimates in the second quarter, pushing earnings up 12.1 percent for the index as a whole, according to Thomson Reuters data.

Even so, the stock market’s unbroken push higher this year leaves it more vulnerable to a significant decline if a debt ceiling deal is not reached by late September, said Matt Watson, a co-portfolio manager of the $3.2 billion James Balanced Golden Rainbow Fund.

As a result, Watson’s fund has been raising cash and is preparing to buy shorter-duration Treasury bonds if they see a sign of a sell-off.

“The stock market is very overvalued, so it makes sense to lighten up on risk going into this,” he said.