Buying the stocks that Wall Street calls boring has paid off over the past six months—but now this “defensive” strategy is starting to look pretty risky.

Utilities, a sector traditionally viewed as a safety play in times of market turmoil, have risen 21.2% in the first half of 2016—the sector’s best first-half performance in over 25 years.

But if you ask some analysts, the run-up in prices leaves the sector extremely overextended and valuations dangerously high; some analysts believe the sector is in bubble territory.

Are some investors already catching on? Thursday’s decline marked the utilities sector’s sharpest daily drop, at 1.8%, in seven weeks.

Over the past six months, investors in search of yield and safety in a global environment of historically low yields, elusive growth and geopolitical uncertainties piled into anything that resembled defensive plays—Treasurys and gold prices soared as did share prices of utilities, telecoms, real-estate investment trusts, consumer staples and master limited partnerships.

The most commonly cited valuation metric, the 12-month forward price-to-earnings ratio of the S&P 500 utilities sector is currently at 19, above its 10-year average of 14 and well above the PE of the broader index, as shown in the chart below.

“It’s a simple macro trade, when rates are falling and there is global uncertainty investors buy defensive and domestic sectors like utilities,” explained Diane Jaffee, senior portfolio manager at TCW.

Even as utility-stock prices have risen over 20%, expected earnings growth for the sector in 2016 is only 4.4%, according to FactSet.

But when investors rush in and earnings don’t grow, valuations get dangerously frothy, analysts said. The trailing 12-month PE ratio for utilities, currently at 19.85, is higher than that of the typically more-volatile technology sector, at 19.16, according to a note from Bespoke Investment Group.

“The last two times when utilities rallied in the face of falling interest rates—for example in 2011-12 and late 2014, a sudden rebound in rates resulted in the collapse of utilities,” Jaffee said.

The chart below illustrates returns of the S&P 500 sectors; it indicates that oversize gains usually follow mediocre returns in the following years.

The biggest gains in utilities this year came in the run up to and immediately after the Brexit referendum—when the U.K. voted to leave the European Union.

The S&P 500 Utilities sector rallied more than 8% in June with half of those gains coming in the past week, post Brexit, when global financial markets suffered a rout and government bond yields touched record lows.

Still, the sector has been climbing steadily since the start of the year and is, along with telecom, the best-performing sector on the S&P 500 index on a year-to-date basis.

The most popular utilities ETF, the iShares Select Utilities SPRD XLU, -1.77% , which has about $9 billion assets under management, saw a $1.7 billion inflow since the start of the year.

And as chart-watchers will note, the run higher in utilities also broke through key technical levels.

“The PHLX Utilities Index UTY, -1.83% broke out in June and saw immediate follow-through,” said Katie Stockton, chief technical strategist at BTIG.

A so-called breakout refers to prices breaking above a level of resistance and heading higher. A follow-through refers to a security continuing to add gains in strong volumes, suggesting a new uptrend is under way.

“I give the benefit of the doubt to utilities. Even though they look overextended and overbought, the steep climb is not yet parabolic,” Stockton added.

Moves in defensive stocks are correlated to the recent rally in government bonds, fueled by a global flight to the perceived safety of government debt. As demand drives up bond prices, yields fall.

But that could be reversed, analysts said, and Treasurys could come under selling pressure, leading bond prices to tumble and yields to rebound, if there are any potential signs of U.S. inflation, including wage inflation in upcoming jobs reports. Economist polled by MarketWatch expect the nonfarm payrolls report due on Friday to show 170,000 jobs created in June and a 0.2% uptick in average hourly earnings. See Economic Calendar.

Year-over-year wage inflation, which had been subdued throughout this recovery, has been trending higher over the past year.

A selloff in Treasurys due to rising wage inflation would spill over to defensive equities, such as utilities, said Kent Engelke, chief economic strategist at Capitol Securities Management.