Stocks finished lower on Friday after a report that Michael Flynn was directed by President Trump to talk to Russians sent investors on a wild ride.

ABC News reported that Flynn, the former national security adviser, would testify that he was directed to make contact with Russians during the presidential campaign in 2016. Flynn pleaded guilty to lying to the FBI about his postelection contacts with Russia's ambassador to the U.S.

JUST IN: @BrianRoss on @ABC News Special Report: Michael Flynn promised "full cooperation to the Mueller team" and is prepared to testify that as a candidate, Donald Trump "directed him to make contact with the Russians."

ABC said later in an updated report that Flynn will say Trump asked him to make contact with Russia "initially as a way to work together to fight ISIS in Syria."

In a statement, Flynn said he agreed to "cooperate with the Special Counsel's Office reflect a decision I made in the best interests of my family and of our country."

"If you believe the market has been rallying in the last 13 months [on Trump, this report] potentially unravels all of that," said Jeremy Klein, chief market strategist at FBN Securities. "Markets don't like uncertainty and this is the ultimate uncertainty."

The major averages hit their session lows on the report, with the Dow Jones industrial average briefly dropping 350.45 points before closing 40.76 points lower at 24,231.59.

The declined 0.2 percent to close at 2,642.22 and fell as much 1.4 percent. In what amounted to the wildest trading day since the election, the S&P 500 traded in a range of 1.71 percent, the widest since Nov. 9, 2016, said Frank Cappelleri, executive director at Instinet.

The Nasdaq composite lagged, pulling back 0.4 percent to 6,847.59; it had dropped as much as 1.99 percent at its session lows.

Gold and Treasurys spiked higher following the ABC report as investors fled to market safe havens.

"It comes down to did Trump obstruct justice in any way," said Peter Boockvar, chief market analyst at The Lindsey Group. "It's another potential political blindside. We've gotten a lot of those."

But it appears many investors were willing to bet that the Flynn report does not mean the Mueller probe would lead directly to Trump and derail his presidency and economic agenda. Stocks pared their losses after Senator Mitch McConnell told reporters that they had the votes to pass the Senate tax bill.

"If you took out the Flynn news, we'd probably be up right now, but if you took out the tax news, we'd see more volatility" in the market, said Wade Balliet, chief investment strategist at Bank of the West. "I think they're canceling each other out."

Senate Republicans had delayed voting on their tax bill Thursday. The setback concerned a fiscal "trigger" that forced lawmakers to patch up the plan only hours before a planned final vote.

But the Senate showed signs of progress on coming to an agreement on a tax measure. Republican Senators Steve Daines, Jeff Flake and Ron Johnson — three of the last GOP holdouts on the bill — said they would support the measure, increasing the likelihood of it passing.