Stocks ended down Friday, weighed down by chipmaker Broadcom’s (AVGO) $2 billion sales-guidance cut on weakening demand and the impending US government ban on American companies doing business with China’s Huawei Technologies.

“We currently see a broad-based slowdown in the demand environment, which we believe is driven by continued geopolitical uncertainties, as well as the effects of export restrictions on one of our largest customers,” Broadcom Chief Executive Officer Hock Tan said. “As a result, our customers are actively reducing their inventory levels, and we are taking a conservative stance for the rest of the year.”

Tech shares ended more than 0.8% lower, pushed down by Broadcom’s nearly 5.6% drop. NXP Semiconductors (NXPI) and Texas Instruments (TXN) each 3.8 and 3.5%, respectively.

Energy shares fell more than 0.7% after the International Energy Agency lowered its forecast for global oil demand growth in the second quarter. West Texas Intermediate crude oil futures rose almost 0.6% to $52.58 a barrel while international benchmark Brent crude rose nearly 1.4% to $62.14.

Noble Energy (NBL) dropped 5% while Cimarex Energy (XEC) fell 3.6%. National Oilwell Varco (NOV) lost 3.5%.

Investors moved to defensive sectors, lifting utilities shares nearly 1% higher. Public Service Enterprise Group (PEG) added 1.6% while AES (AES) gained 1.4%. American Water Works (AWK) advanced 1.4%.

Online pet-supply retailer Chewy (CHWY) soared 59% in its first day of trading.

In economic news, retail sales rose less than expected in May, led higher by non-store retailers, while April’s print was revised from a contraction to a gain, government data showed.

Meanwhile, a key gauge of consumer sentiment ticked lower in June, missing analysts’ estimates as University of Michigan survey participants lowered their growth prospects for the national economy in the wake of tariffs on Chinese exports and a softening in employment growth.

Also, the Federal Reserve reported that Industrial production in the US rose more than expected last month.

The Dow Jones Industrial Average ended slightly down to end the week up 0.4%. The Standard & Poor’s 500 slipped nearly 0.2%, ending the five-day period up 0.5%. The Nasdaq Composite lost more than 0.5% to finish the week 0.7% higher.