A sudden, surprising selloff in technology names pulled the S&P 500 and Nasdaq from record intraday highs set earlier in the session. 

The S&P 500 was down 0.06%, and the Nasdaq tumbled 1.3%. The Dow Jones Industrial Average gained 0.3%,  All three hit intraday records earlier in the session. 

A broad tech rally came to a sudden end on Friday, pulling the Nasdaq away from broader markets and into the red. Advanced Micro Devices (AMD) - Get Report , which led the sector all week, turned lower, while other chipmakers and tech names including Nvidia (NVDA) - Get Report , Ambarella (AMBA) - Get Report , Microsoft (MSFT) - Get Report and Texas Instruments (TXN) - Get Report also fell. AMD had been higher this week on higher demand for graphic processing chips given the rise in Bitcoin and cryptocurrency use.

Industry leaders bore some of the worst of the sector's losses. Apple (AAPL) - Get Report  , Alphabet (GOOGL) - Get Report , Alibaba (BABA) - Get Report , Facebook (FB) - Get Report , Cisco (CSCO) - Get Report , and Intel (INTC) - Get Report were all sharply lower, while the Technology Select Sector SPDR ETF (XLK) - Get Report slumped 2.1%. 

 "Technology stocks have been rallying aggressively in recent times, as momentum-chasing speculators bought names such as Alphabet, Amazon, Apple, Facebook and et al. like there was no tomorrow," said Fawad Razaqzada, market analyst at Forex.com. "Such bullish runs often end abruptly and that is what may have happened today... The technology sector needs to be watched closely in early next week as it was the leader in the rally. Now that the sector is falling, it could drag the major indices lower and undermine investor confidence in other sectors."

Stocks had risen earlier in the session on high hopes for a rate hike in the coming week. A rate hike in June has been highly expected over the past several weeks with comments from Fed members suggesting there were more hawks than doves. Members have pointed to a tightening job market, the risk of being behind the curve on inflation, and a generally healthy economic recovery. 

The Federal Open Market Committee, the monetary policy arm of the central bank, is next set to meet June 13-14. Markets already have high expectations for an interest-rate increase at the committee's next meeting, the second of three expected hikes this year. Wall Street is incredibly confident in a June rate hike -- CME Group fed funds futures have priced in a more than 99% chance of a 25-basis-point increase.

"We would think it's unlikely that the Fed would throw in a surprise to the market and not move interest rates," Mark Heppenstall, CIO at Penn Mutual Asset Management, said in a phone call. "I think there would be the potential for "what do they know that we don't know" type of mindset among investors if they weren't to deliver on their tightening."

Banking stocks performed well on Friday on anticipation for a rate hike next week. JPMorgan (JPM) - Get Report , Wells Fargo (WFC) - Get Report , Bank of America (BAC) - Get Report , Citigroup (C) - Get Report  and Royal Bank of Canada (RY) - Get Report  moved higher, while the Financial Select Sector SPDR ETF (XLF) - Get Report rose 1.6%. 

Wells Fargo and Citigroup are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells WFC or C? Learn more now.

Walgreen's (WBA) - Get Report  also weighed on the Nasdaq on reports the Federal Trade Commission is preparing to block its proposed merger with Rite Aid (RAD) - Get Report . Fred's (FRED) was also lower -- the retailer was to purchase a number of Rite Aid stores to ease anti-competition concerns. 

The U.K. had more of an uncertain future after Thursday's election denied sitting Prime Minister Theresa May a clear victory. The shock general election in the U.K. failed to earn a majority for the ruling Conservative Party, headed by Prime Minister Theresa May. The election delivered no majority for any party, though the Conservatives did remain the largest with the greatest number of seats. 

However, in comments following the election, May announced that her Conservative Party will form a government with the Democratic Unionist Party. May said she had the legitimacy to form a government as her party won the most seats, 318, in Thursday's snap election, but failed to reach the 326 seats needed for a majority. Combined with Northern Ireland's DUP 10 seats, it brings the Conservatives over the top to form a government.

"Clearly the political way forward is difficult, but from a market perspective it's an ambiguous result," said Mark Burgess, chief investment officer EMEA and global head of equities at Columbia Threadneedle Investments. "What we do know is that markets hate uncertainty and there will be volatility."

May provided no insight into whether there will be a formal coalition between the Conservatives and the DUP or if they will operate a "confidence and supply arrangement, whereby the DUP would support a minority government on vital matters in return for some of their policies being enacted.

The lack of a decisive victory for the Conservatives also called into question how the U.K. will negotiate its exit from the European Union. May, one of the major forces behind the initial negotiations, had called for the election to shore up the party's position ahead of Brexit negotiations. 

"Political uncertainty has increased," Barclays analysts wrote in a note. "The British negotiators will head to Brussels without a clear agenda as consensus within Parliament regarding the type of Brexit remains elusive. In the absence of a clear mandate, Brexit remains as 'hung' as ever."

European markets moved higher after the U.K. election. The FTSE 100 in London rose 0.44%, the CAC 40 in France added 0.15%, and Germany's DAX increased 0.29%. The pound fell 1.6% against the U.S. dollar on Friday, changing hands at 1.2744.

U.S. stocks on Thursday managed to eke out small gains, enough to push the Nasdaq to a new record close, following former FBI Director James Comey's public testimony to the Senate.

In comments to the Senate, Comey said, "I take the president at his word I was fired because of the Russia investigation." When asked, Comey said he had "no doubt" that Russian government officials had attempted to interfere in the 2016 election. He also called Trump a liar and said the version of events the White House had pushed in the wake of his surprise firing were an effort to defame him.

"The administration then chose to defame me and more importantly the FBI, by saying the organization was poorly led," Comey said, referring to the White House's story that the FBI had been unhappy with his role as director. "Those were lies, plain and simple."

Comey detailed his numerous meetings with Trump since January in his pre-released opening statement on Wednesday afternoon before the Senate Select Committee on Intelligence. Comey said he had not told Trump that he would cease investigations into Flynn despite Trump's request. Comey also said that Trump had said, "I need loyalty. I expect loyalty." Comey based his testimony on his recollections and a series of memos composed after several meetings. Trump fired Comey in May while the FBI was investigating the Trump transition team's ties to Russia.

Wall Street had seen tentative trading in the days leading up to Thursday on nerves over Comey's testimony, the U.K. election and a monetary policy meeting of the European Central Bank. The ECB opted to leave rates unchanged at that meeting, though did remove language that suggested the central bank might move rates lower. 

Massive news developments in recent days could have led to increased market volatility. However, that did not happen. James "Rev Shark" Deporre breaks down the discrepancy over on our premium site for investors, Real Money. Get his insights with a free trial subscription.

For Friday, the economic calendar in the U.S. includes the weekly Baker Hughes Rig Count at 1 p.m.

SoftBank (SFTBY) reached a deal of buy robotics pioneer Boston Dynamics from Alphabet (GOOGL) - Get Report . Terms of the transaction weren't disclosed. The deal aligns with SoftBank's push into "paradigm-shifting technologies and its vision of catalyzing the next wave of smart robotics," the Tokyo-based company said.

Boston Dynamics' robots can run, jump and climb stairs, with the company's CEO Marc Raibert describing them as "nightmare inducting." As part of the deal, SoftBank also is buying from Alphabet a company called Schaft that develops humanoids and came out of the University of Tokyo.

Alphabet is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells GOOGL? Learn more now.

Dupont Fabros Technology (DFT) surged after agreeing to be acquired by Digital Realty Trust  (DLR) - Get Report in a deal worth $4.95 billion. Digital Realty has offered 0.545 of its shares for every Dupont Fabros share outstanding, equivalent to $63.63 a share. The deal values Dupont at a nearly 15% premium to its close on Thursday.  

Pandora (P)  rose after John Malone's Liberty Media-controlled SiriusXM  (SIRI) - Get Reportannounced that it is making a $480 million investment in the music streaming service. As part of the agreement a subsidiary of SiriusXM will acquire an aggregate of $480 million in newly issued Series A convertible preferred stock of Pandora. SiriusXM bought $172.5 million of Series A preferred stock after the execution of the deal and has agreed to buy the remaining Series A stock after the deal closes.