Chris Zaccarelli, chief investment officer at Cornerstone Financial Partners, echoed Pavlik's remarks. "I don't think this is a make-or-break situation for tax reform," he said. "It would be more market-moving news if this were the final nail in the coffin for tax reform and the market doesn't believe that."

"The Republicans are a bit nervous but at the end of the day, most of them want to get tax reform through," said Robert Pavlik, chief market strategist at Boston Private Wealth. "But if we get wind that there's not going to be tax reform, ... that's when we get into some trouble."

The reaction to Comey's firing in the market was largely muted because a large number of investors still believe the market will get tax reform at some point.

The Dow Jones industrial average ended about 35 points lower with Disney and Boeing contributing the most losses. The media giant's stock was on track for its biggest one-day decline since June after reporting weaker-than-expected quarterly sales . Boeing, meanwhile, tumbled to session lows after the firm said it is temporarily suspending 737 Max flights.

The S&P 500 also eked out a record close, with energy rising more than 1 percent to lead advancers. The sector popped after the Energy Information Administration reported a larger-than-expected drawdown in crude barrels.

A trader on the floor of the New York Stock Exchange.

But others were worried that Comey's abrupt dismissal could delay key items in the administration's agenda, including corporate tax reform and deregulation.

"Comey's firing is igniting a storm that will be yet another distraction to the public policy driven thesis for economic growth and higher stocks," Michael Block, chief strategist at Rhino Trading Partners, said in a note to clients Wednesday.

"With that, we are putting our long trade on financials on watch. It worries us that the sector can't hold a rally. The rally in the sector (and for Value vs. Growth) should play out as this situation gets swept away in favor of more talk on tax cuts and stimulus, but any delays will move us to the sidelines and has us choosing spots more carefully," Block said.

Financials, especially banks, have been some of the best-performing stocks since Trump's election last November. The Financials Select Sector SPDR Fund ETF (XLF) has spiked nearly 20 percent since Nov. 8.

Comey's firing came at a time when Republicans were seemingly getting ready to move forward on tax reform as they got the ball rolling on health care reform. On April 26, Treasury Secretary Steven Mnuchin and White House chief economic advisor Gary Cohn outlined Trump's tax plan, which included reducing the top bracket to 35 percent and lowering the business tax rate to 15 percent.

"The market really is expecting a cut," said Matthew Peterson, chief wealth strategist at LPL Financial. "We still feel it's a matter of when, not if a cut happens. But any thought this gets pushed to 2018 is a market negative."

Equities entered Wednesday's session near record highs, as a strong earnings season helped stock prices surge over the past month.

According to data from FactSet, 75 percent of the S&P 500 components that had reported as of Friday had topped bottom-line expectations, while 66 percent had beaten sales estimates. Eighty-three percent of S&P 500 companies had reported as of Friday.

In economic news, mortgage applications rose 2.4 percent on a seasonally adjusted basis last week. Import prices rose 0.5 percent, more than expected.

In Europe, stocks closed mostly higher, with the pan-European Stoxx index rising 0.16 percent. The index is currently outperforming the S&P, but where it goes next depends on what happens in France's parliamentary election next month, said Luke Bartholomew, investment manager at Aberdeen Asset Management.

"It's important insofar as it leads to further European integration," he said.