By Anna Isaac and Alexander Osipovich

Gains by banks and energy companies lifted major U.S. stock indexes on Monday, helping the market claw back some lost ground after four consecutive weeks of declines.

The Dow Jones Industrial Average advanced 528 points, or 1.9%, in afternoon trading. The S&P 500 rose 1.8%, while the technology-heavy Nasdaq Composite climbed 1.6%.

The rally came as investors said last week's selloff was overdone.

"There's been a lot of froth in markets recently that has been washed out. The underlying fundamentals are all moving in the right direction," said Hani Redha, a portfolio manager at PineBridge Investments. "We are in the early stages of a multiyear expansion. It will remain volatile in the coming weeks, but overall the trend will remain upward."

The financial and energy sectors, which tend to be sensitive to economic trends, were among Monday's strongest performers. Citigroup and Morgan Stanley were both up nearly 4%, while Chevron and Exxon Mobil were both up more than 3%.

Thomas Hayes, chairman of investment-management firm Great Hill Capital, said his firm had bought shares of Wells Fargo and other banks in recent days. He expects such stocks to fare better than the technology stocks that drove the market's rally from March to September.

"That's where you're going to outperform, with the things that have been left behind so far," he said. Cyclical stocks like banks tend to beat the broader market during recoveries from recessions, he added.

September has been a turbulent month for stocks, with declines in tech stocks pulling down major indexes. The S&P 500 is off more than 6% from the record high it reached at the start of the month.

The Cboe Volatility Index, a measure of expected swings in the S&P 500, climbed Monday. Investors' concerns about rising or elevated levels of coronavirus infections, the uneven pace of economic recovery, political risks and continued tensions between Beijing and Washington have increased the turbulence in the market this month.

Traders are betting on one of the most volatile U.S. election seasons on record, wagering on unusually large swings in everything from stocks to currencies. Investors are scooping up a variety of investments that would pay out if volatility extends far beyond Election Day itself, concerned that the outcome of the presidential contest could remain unclear into December.

"It's a very different environment than that we've seen for any other election," said James McCormick, a strategist at NatWest Markets. "As an investor, you have to protect yourself because you just don't know how this is going to swing."

Investors have grown more concerned about this election after President Trump has repeatedly suggested, without offering evidence, that mail-in ballots will result in widespread fraud benefiting Democrats.

"We've had a lot of comments from President Trump last week indicating that he may not want to hand over power smoothly," said Jane Foley, head of foreign-exchange strategy at Rabobank. "You're in an environment where you've had physical Black Lives Matter protests and a rise in unemployment. That's more likely to be a tinderbox for social unrest."

In corporate news, shares of Devon Energy jumped 11% after The Wall Street Journal reported and the company later confirmed a merger agreement with WPX Energy. The move could help the two companies weather a prolonged industry slump. WPX's stock rallied 16%.

Uber shares gained 3.5% after the ride-hailing company won an appeal over the revocation of its operating license in London, ending for now a yearslong tussle with regulators in one of its biggest global markets.

Overseas, the pan-continental Stoxx Europe 600 rose 2.2%. In Asia, most major benchmarks ended the day in positive territory. Japan's Nikkei 225 Index rose 1.3%, while Hong Kong's Hang Seng rose 1%.

China's Shanghai Composite Index slipped less than 0.1%. New government data showed the nation's industrial profit grew at a slower pace in August as the export sector faced challenges with the reopening of overseas factories.

In bond markets, the yield on the benchmark 10-year Treasury inched up to 0.663%, from 0.659% on Friday.

Futures on Brent crude, the global energy benchmark, rose 0.9% to $42.79 a barrel.

Write to Anna Isaac at anna.isaac@wsj.com and Alexander Osipovich at alexander.osipovich@dowjones.com