March 23 (Reuters) - Wall Street declined on Thursday after lawmakers delayed a vote on a healthcare bill seen as President Donald Trump’s first policy test.

Failure to pass the American Health Care Act would cast doubt on Trump’s ability to deliver other parts of his agenda that need the cooperation of the Republican-controlled Congress, including ambitious plans to overhaul the tax code and invest in infrastructure.

The U.S. House of Representatives had been scheduled to vote on the bill on Thursday, but leaders put off the vote after failing to find enough support among Republicans to pass it.

The S&P 500 has surged 10 percent since the election, mainly due to optimism about Trump’s campaign promises to enact legislation seen as pro-business.

Not passing the healthcare bill would be seen by many investors as pushing back the agenda of corporate tax cuts.

“If this thing gets materially delayed or if we get a ‘no’ vote, we’re going to see a horrific market reaction,” said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa. “But if they vote in the morning and it passes, we’ll have a hell of a rally.”

Jitters about the healthcare bill on Tuesday led investors to sell stocks in what was the S&P 500’s worst day since before Trump’s election. Wall Street’s reaction to the vote’s delay, late in Thursday’s session, was relatively mild.

The Dow Jones Industrial Average ended down 0.02 percent at 20,656.58 points, while the S&P 500 lost 0.11 percent to 2,345.96.

The Nasdaq Composite slipped 0.07 percent to 5,817.69.

Seven of the 11 major S&P indexes declined, with the energy index down 0.36 percent.

Google-parent Alphabet fell 1.19 percent as more firms pull YouTube ads on fears they may appear alongside offensive videos. The stock was the biggest drag on the S&P 500 and the Nasdaq.