Wall Street came out swinging on Tuesday, fighting back against accusations that the markets are “rigged” by high-frequency traders and the exchanges that cater to them.

The boss of one of the country’s largest stock exchanges said it was shameful how best-selling author Michael Lewis falsely accused high-frequency traders (HFTs) of rigging the market by front-running trades.

Michael Lewis

William O’Brien, president of BATS Global Markets, also lashed out at Brad Katsuyama, the founder of IEX Exchange — portrayed as a hero in Lewis’ “Flash Boys: A Wall Street Revolt” — for amplifying the claim.

“Shame on both of you,” O’Brien said in a heated exchange on live TV.

The 23-minute debate among the three on CNBC grew so fierce that traders on the floor of the New York Stock Exchange — whose jobs are put in peril by the growth of computerized trading — stopped to watch and to cheer Katsuyama.

Lewis’ claim — his book hit store shelves Tuesday — of rigged US markets was quickly joined by news that the FBI and state and federal regulators were investigating HFTs for possible illegal conduct.

O’Brien feels the book is nothing short of a 300-page commercial for his rival.