Stocks posted sharp weekly losses on Friday after a strong downturn in technology shares.

The fell 1.6 percent this week, while the Dow Jones Industrial Average and Nasdaq Composite both declined more than 2 percent.

Technology, the biggest sector in the S&P 500 by market cap, was the second-worst performer this week, falling 2.5 percent. The sector dropped following a 5.4 percent decline in Apple. Wall Street analysts worry iPhone sales will slow down. Tech-related shares like Amazon and Netflix were also down 7 percent and 5.7 percent, respectively. Sharp losses in Nvidia dragged down the chips sector and the overall tech sector on Friday.

Facebook was also under pressure this week, falling nearly 4 percent amid backlash from a New York Times article detailing how the company ignored and then tried to hide that Russia used the platform to disrupt the U.S. election in 2016. COO Sheryl Sandberg said in a statement responding to the article: "To suggest that we weren't interested in knowing the truth, or we wanted to hide what we knew, or that we tried to prevent investigations, is simply untrue.

"The danger of a full retest of the October looks real enough, particularly given that the key technology sector remains at the center of liquidation," said Michael Shaoul, chairman and CEO of Marketfield Asset Management, in a note. "The selling has been driven more by fundamental concerns around a number of key index constituents than technical issues, and there is now a danger that the very long period of Nasdaq 100 outperformance … may finally be drawing to a close."

Tech was under pressure again on Friday as shares of Nvidia plunged 18.8 percent on disappointing revenue and guidance. Nvidia's fall dragged the VanEck Vectors Semiconductor ETF (SMH) down by 1.7 percent. Advanced Micro Devices and Micron Technology also fell 3.9 percent and 1.2 percent, respectively.

Retailers were also down sharply this week. The SPDR S&P Retail ETF (XRT) pulled back 4.5 percent this week as Black Friday approaches. Shares of Nordstrom and Williams-Sonoma fell 13.7 percent and 11.2 percent on Friday, respectively, as their quarterly reports disappointed investors.

"The market is beginning to reflect ... we're in the late stages of this cycle," said Wasif Latif, head of global multi-assets at USAA. "Historically, large-cap equities seem to be the last place to show that weakness when it's happening."

The Dow and S&P 500 trimmed some of their weekly losses on Friday, rising 123.95 points and 0.2 percent, respectively. They hit their session highs after President Donald Trump said he was hopeful the U.S. and China will strike a deal on trade, a matter that has been pressuring the market for most of 2018.

However, White House officials later told CNBC that a deal was not coming soon and that people should not read too much into Trump's comments.

Friday's moves also come amid heightened fears the U.K. could soon crash out of the European Union without a divorce deal. The British pound suffered its biggest one-day loss against the euro since October 2016 on Thursday, as a flurry of resignations rocked the government of U.K. Prime Minister Theresa May.

Christopher Granville, a managing director at TS Lombard, still thinks a so-called hard Brexit will be avoided.

"The fact that the U.K. government is risking its political life by agreeing the present draft deal implicitly recognizes that the alternative of heading for a crash-out would certainly be an act of political suicide," Granville said.

—CNBC's Spriha Srivastava contributed to this report.