Shares of large gold mining companies took it in the neck Thursday, falling along with the broader stock market even as the price of gold notched a fresh record.

Anglo American plc, which trades in the U.S. as an ADR, plunged 6.9 percent, Harmony Gold Mining Co., another ADR, dropped 3.8 percent and AngloGold Ashanti Ltd. fell 3.1 percent.

Other gold miners that gave up ground were Barrick Gold Corp., Goldcorp. Inc., Newmont Mining Corp., Kinross Gold Corp. Gold Fields Ltd. and Yamana Gold Inc.

The Nasdaq composite index ended the day down 5.22 percent, the Dow Jones industrial average was off 3.68 and the S&P 500 settled lower by 4.46 percent.

Investors fleeing the carnage in stocks piled into gold. As a result gold for December delivery, the most actively traded contract on the CME Comex division of the New York Mercantile Exchange, gained $28.20 to settle at $1,822 per ounce. Before the end of the trading session it hit a high of $1,832.

The gains were remarkable because they came in the face of a stronger U.S. dollar which would normally weigh on the price of gold.