The S&P 500 closed out Friday with its worst weekly losses since the election as President Donald Trump's inability to pass health care reform raised doubts over his potential for change.

The S&P 500 tumbled 1.44% over the past five days, its worst weekly loss since the week ended November 4. The Dow Jones Industrial Average fell 1.52%, and the Nasdaq slid 1.47%. Stocks had rallied to new heights over the past few months on high hopes a Trump administration would pass business-friendly regulatory reform and tax cuts.

House leaders pulled their unpopular health care bill before a crucial vote late Friday afternoon at Trump's request. Republicans could afford only 21 votes against the bill, though they reportedly faced far more than that threshold.

The Trump administration and Speaker Paul Ryan have implored lawmakers in closed-door meetings this week to support the bill. The passage of the bill was seen by Wall Street as a test as to whether Trump can enact all he has promised, particularly tax cuts and regulatory reform.

"There's a degree of uncertainty over the extent and magnitude and timing of any regulatory reform that the Trump administration plans to put forward -- so far they've just punted," Cathy Seifert, director of financial institution research at CFRA Research, said in a phone call. "If [health care reform] is an indication of how regulatory reform is going to go, we've got a lot of headaches ahead of us."

Patience with the slow progress of health care and financial reforms wore thin earlier in the week, sending stocks spiraling to their worst losses of the year. Tuesday's selloff saw the worst losses for Wall Street of 2017.

Trump reportedly told lawmakers that if the health care bill doesn't pass on Friday, he will move on to tax reform and other issues, leaving Obamacare in place. On the campaign trail last year, Trump said he would repeal Obamacare on day one of his presidency. A vote on the Obamacare repeal and replace bill was originally scheduled for Thursday evening, but was delayed by GOP leaders until late Friday afternoon. They pulled it shortly before markets closed on Friday.

The American Health Care Act, designed to replace the Affordable Care Act (better known as Obamacare), has been widely criticized on both sides of the aisle. The Congressional Budget Office calculated that 24 million more people will be uninsured by 2026 under the Republicans' bill, including 14 million more by 2018. Premiums are expected to jump 20% in the individual market in 2018 and 2019.

The Trump administration officially approved the Keystone XL pipeline on Friday, as expected. Former President Barack Obama had blocked the controversial pipeline. TransCanada (TRP - Get Report) climbed more than 1% after receiving a presidential permit to construct the Keystone pipeline. The permit from the U.S. Department of State led TransCanada to discontinue its bankruptcy claim. The company said it appreciates the new administration "reviewing and approving this important initiative."

It's been a rough week for Trump. On Monday, FBI director James Comey confirmed that the intelligence agency was investigating the Russian government's involvement in the election and will also look into ties with the Trump campaign. Intelligence agencies previously confirmed that Russian hackers had been involved in efforts to favor a Donald Trump win. Comey noted that Russia "wanted to hurt our democracy, hurt [Clinton], help him." He also refuted Donald Trump's claims that former President Barack Obama had wiretapped him, noting that he had "no information that supports (Trump's) tweets."

In economic news, durable goods orders in February came in better than anticipated. The Census Bureau reported on Friday that orders for long-lasting goods in the U.S. rose 1.7% last month, weakening from 2.3% growth in January but above estimates of 1.5% growth. Core goods orders fell by 0.1%, weaker than an anticipated increase of 0.5%.

New home sales surged to seven-month highs in February as high demand overcame constrained inventory. Sales of newly built houses in the U.S. rose by 6.1% month over month to a seasonally adjusted annual rate of 592,000, according to the Commerce Department. Sales were at their second-highest since 2008 and came in higher than estimates of 571,000.

Existing home sales in the U.S. fell in February as constrained inventory failed to meet high demand. Previously owned home sales declined by 3.7% to an adjusted annual rate of 5.48 million in February, according to the National Association of Realtors. Analysts anticipated a stronger rate of 5.57 million.

In earnings, Dow component Nike (NKE - Get Report) issued weaker-than-expected guidance. The athletic apparel company reported worldwide futures orders, a measure of future sales, fell 4% and that it anticipates current-quarter sales growth in the mid-single-digit percentages. CEO Mark Parker said online shopping trends have made for a more competitive environment.

Micron Technology (MU - Get Report) said renewed demand for chips drove earnings growth. Adjusted profit of 90 cents a share came in 7 cents higher than estimates.

GameStop GME reported a double-digit drop in profit and announcing plans to shutter at least 150 of its total 7,500 stores. The video game retailer reported a 16% decline in fourth-quarter profit and 14% drop in quarterly sales. Net income of $2.04 a share missed estimates of $2.29.