The S&P 500 and the Nasdaq logged their seventh straight week of losses, their longest losing streak since the end of the dotcom bubble in 2001.
The Dow suffered its eighth consecutive weekly decline, its longest since 1932 during the Great Depression.
Worries about surging inflation and rising interest rates have pummeled the U.S. stock market this year, with danger signals from Walmart Inc and other retailers this week adding to fears about the economy.
The S&P 500 spent most of the session in negative territory and at one point was down just over 20% from its Jan. 3 record high close before ending down 18% from that level and flat for the day.
Closing down 20% from that record level would confirm the S&P 500 has been in a bear market since reaching that January high, according to a common definition.
The tech-heavy Nasdaq was last down about 27% from its record close in November 2021.
Graphic: S&P 500 bear markets -
Weighing heavily on the S&P 500, Tesla tumbled 6.4% after Chief Executive Elon Musk denounced as "utterly untrue" claims in a news report that he sexually harassed a flight attendant on a private jet in 2016.
Other megacap stocks also fell, with Apple Google-owner Alphabet Inc down 1.3% and Nvidia losing 2.5%.
Shares of Deere & Co dropped 14% after the heavy equipment maker posted downbeat quarterly revenue.
Pfizer rose 3.6%, helping the S&P 500 avoid a loss for the day.
Recent disappointing forecasts from big retailers Walmart, Kohl's Corp and Target Inc have rattled market sentiment, adding to evidence that rising prices have started to hurt the purchasing power of U.S. consumers.
On Friday, Ross Stores plunged 22.5% after the discount apparel retailer cut its 2022 forecasts for sales and profit, while Vans brand owner VF Corp gained 6.1% on strong 2023 revenue outlook.
Traders are pricing in 50-basis point rate hikes by the U.S. central bank in June and July.
The S&P 500 edged up 0.01% to end the session at 3,901.36 points.
The Nasdaq declined 0.30% to 11,354.62 points, while the Dow Jones Industrial Average rose 0.03% to 31,261.90 points.
Graphic: S&P 500's busiest trades -
For the week, the S&P 500 fell 3.0%, the Dow lost 2.9% and the Nasdaq declined 3.8%.
About two thirds of S&P 500 stocks are down 20% or more from their 52-week highs.
Volume on U.S. exchanges was 13.0 billion shares, compared with a 13.5 billion average over the last 20 trading days.
Declining issues outnumbered advancing ones on the NYSE by a 1.16-to-1 ratio; on Nasdaq, a 1.24-to-1 ratio favored decliners.
The S&P 500 posted 1 new 52-week highs and 48 new lows; the Nasdaq Composite recorded 11 new highs and 353 new lows.
(Reporting by Amruta Khandekar and Devik Jain in Bengaluru, and by Noel Randewich in Oakland, Calif.; Editing by Shounak Dasgupta, Arun Koyyur and Grant McCool)
By Noel Randewich and Amruta Khandekar