U.S. stock markets capped the week in record terrain — with the Dow closing above 35,000 for the first time — with strong corporate earnings lifting investor spirits after fears of the delta variant’s tightening grip sent the blue-chip index sliding to its worst single-day loss of 2021.

The Dow Jones industrial average rebounded from Monday’s 725-point dive with four days of gains, surging 238.20 points, or 0.7 percent, on Friday to 35,061.55. It added nearly 1.1 percent on the week.

The S&P 500-stock index climbed 44.31 points, or 1 percent, to a record 4,411.79, bringing it up nearly 2 percent for the week.

The tech-heavy Nasdaq added 152.39 points, or 1 percent, to end the trading day at 14,836.99, also a record. It gained nearly 3 percent on the week, boosted by strong earnings: Snap and Twitter walloped expectations with robust revenue and user growth, powering their shares; Twitter shares climbed 3 percent, while Snap sailed nearly 24 percent.

“With roughly 87% of companies beating earnings estimates so far this month, investors continue to have reason for optimism which is supported by the low rates in the bond market,” Wayne Wicker, chief investment officer at Vantagepoint Funds, said in an email to The Washington Post.

“And despite concerns early in the week regarding the Delta variant, I believe that investors are beginning to recognize that this issue will probably not have the same impact on the economy as we saw last year given that almost 70% of the U.S. population over 18 have at least one vaccine shot which should provide for better health outcomes than this time last year,” he said.

Some overseas investors shared the brightened mood. European markets were positive across the board, with France’s CAC 40 advancing 1.4 percent and the benchmark Stoxx 600 index climbing 1.1 percent.

U.S. stocks, which cratered in the early days of the pandemic, have been on a tear. The Dow has swelled 32 percent since last year, while the S&P 500 and Nasdaq have shot up 37 and 43 percent, respectively.

The enthusiasm comes even as the delta variant flashes warning signals that the coronavirus pandemic is far from over. Caseloads are soaring in some Asian countries, triggering new rounds of travel restrictions. The United States is grappling with fast-spreading outbreaks across the South and Midwest, in states with low vaccination rates, where hospital officials there say they are reeling from a surge of patients.

Unease over the recovery’s health has deepened after weekly unemployment gains logged their third uptick in six weeks, spiking to 419,000, the Labor Department reported Thursday.

The delta variant now makes up more than 83 percent of cases circulating in the United States, according to the Centers for Disease Control and Prevention. People infected with the variant appear to carry a viral load that is more than 1,000 times that of those infected with earlier forms of the virus, allowing the virus to spread rapidly among unvaccinated people, scientists have found.

“While the markets were certainly shaken early in the week by the prospects of the delta variant affecting the pace of the economic recovery, investors have turned their attention to an exceptionally strong earnings season and resilient profit margins across the board, assuaging fears that while the emergence of new variants may slow the recovery, they likely won’t derail it,” said Nicole Tanenbaum, chief investment strategist at Chequers Financial Management.

Much like last year, the stunning market rallies can present a jarring contrast to rising caseloads and the plight of the broader economy and society. Many investors also rely on long-term time horizons, fixing their gaze beyond the immediate and most threatening shocks of the public health crisis.

“The market is responding to delta the way it should, and frankly, the way it has for a long, long time,” said David Bahnsen, chief investment officer of the Bahnsen Group, a wealth management firm. “Case growth does not move the market; an excess run on hospital resources could.”

Other experts noted that the extraordinary interventions of the Federal Reserve have gone a long way in stemming the panic that gripped Wall Street during the early, chaotic days of the pandemic. If the delta variant does significant damage to the U.S. economy, the Fed could delay its timeline for tightening its low interest policies, said Kristina Hooper, chief global market strategist at Invesco.

Last month, central bankers signaled interest rate increases would come in 2023, sooner than expected. But new coronavirus cases and the potential for a pandemic resurgence in the United States further complicate the debate about how to best facilitate the economic recovery.