Utilities played a key role helping drive the market’s rally for much of this year, but have been sinking fast even as the broader market just below all-time highs.

The Utilities Select Sector ETF, the largest exchange-traded fund tied to stocks in the sector, is on pace to suffer its biggest monthly drop since February 2009, down 7.9% so far in May. Every other of the eight widely traded sector ETFs sponsored by State Street Global Advisors has climbed higher this month.

The Utility ETF bounced back Thursday, up 0.9% to $38.16, after closing Wednesday at its lowest level since March.

Generally, slow-but-steady, utility stocks once held strong appeal because of their high dividend payouts and sturdy performance. But rising optimism for the pace of economic growth is prompting ETF investors to move into sectors more closely tied to growth, like technology and industrials.

Others are bailing on utilities with bond yields rising on speculation that the Federal Reserve might pare back its monthly asset-purchase program. The promise for high payouts from bonds reduces the need to squeeze income from utility stocks, investors say.

In May, money has flowed out of so-called defensive sector stock ETFs at a fast clip. ETFs that track utility stocks have posted outflows of $267 million, the most since August, according to data through Tuesday from BlackRock Inc. Other defensive sectors like consumer staples and health-care ETFs also are on track to suffer their biggest monthly outflows of the year.

Picking up the slack are technology, industrial and consumer discretionary sectors. Tech ETFs, which have had inflows of $1.2 billion so far in May, are set to see their biggest monthly inflow since at least the start of 2012.

“We had this rush of yield-seekers over the past year, and that translated into flows into utilities, telecommunications stocks and consumer staples,” said David Lutz, head of ETF trading strategy at Stifel Nicolaus. “Now we’re seeing a rotation away from the sectors where these yield-seekers had favored. If the economy is improving, people are saying, ‘let’s get into the high-powered cyclicals that have so far been lagging.’”

Rising interest rates are helping fuel the exodus. Last week, Fed Chairman Ben Bernanke said the central bank could take a first step toward trimming its $85 billion-a-month bond-buying program at one of its next few meetings if the economy continues to improve in comments before U.S. lawmakers. The U.S. 10-year Treasury bond yield is now at 2.104%, up nearly half a percentage point on where it started the month.

“There is a correlation between interest rates and utilities since they are fixed-income surrogates,” said Scott Davis, portfolio manager for Columbia Management’s $8.6 billion dividend income fund. “Historically, people buy them for the yield, so we’d expect to see cost adjustments as bonds become more competitive again.”

Further compounding the declines in utility-sector stocks this week was a downbeat reading on future electricity prices. On Friday, results of an annual auction used to set power prices across 13 states in 2016 and 2017 came in lower than expected, in part because rising supply from natural-gas fired power plants, according to PJM Interconnection, a regional power-grid operator.

“Prices were down fairly significantly, and that caught people by surprise,” said Mr. Davis. The auction prompted as series of stock-recommendation rating downgrades from Wall Street analyst in share of companies like Exelon Corp. and FirstEnergy Corp., both down at least 7.5% so far this week.

Bearish sentiment about the utility sector spilled in the options market, where traders were loading up on bets for further declines. On Wednesday, the number of the Utility Select Sector’s ETF put options, which tend to profit from declines in shares, hit the highest number on record, according to options-data provider Trade Alert.