Investors also contended with the latest news out of the White House. President Donald Trump warned Mexican President Enrique Pena Nieto on Friday that he was ready to send U.S. troops to stop "bad hombres down there" unless the Mexican military does more to control them , according to an excerpt of a transcript of the conversation obtained by The Associated Press.

The Federal Reserve kept interest rates unchanged Wednesday, following its first monetary policy meeting. The central bank also gave little clues when it may be raising rates next.

Andrew Chamberlain, chief economist at Glassdoor, said he expects the labor market's momentum to continue at least throughout the spring. "This is the largest jobs expansion we've seen on record. Expansions don't die of old age; they die of economic shocks," he said. "We're also riding high on a wave of consumer confidence."

Recent employment data has been strong, with ADP and Moody's reporting private firms added 246,000 jobs last month, well above estimates.

"Now that we're past the Fed, the next big worry for the market is the jobs report. I think investors are taking a wait-and-see approach ahead of the report," said Adam Sarhan, CEO at 50 Park Investments. "So far, there have not been any economic disasters [since the election]; that's why you're seeing markets hold just below all-time highs."

The Dow Jones industrial average fell 6 points, with UnitedHealth Group contributing the most losses and Merck the most gains. The S&P 500 gained 0.06 percent, with telecommunications falling 1.2 percent to lead decliners and real estate outperforming. The Nasdaq composite dropped 0.11 percent.

Stocks ended mostly flat on Thursday as investors looked ahead to Friday's jobs report, amid growing tensions between the United States and other global powers.

Traders work on the floor of the New York Stock Exchange on January 5, 2017, in New York City.

"You have a bunch of bad hombres down there," Trump told Pena Nieto, according to the excerpt given to AP, which did not contain details regarding tone or context of the remark. "You aren't doing enough to stop them. I think your military is scared. Our military isn't, so I just might send them down to take care of it."



Art Hogan, chief market strategist at Wunderlich Securities, said "the market shifted its focus from things that are positive, like economic data and earnings, to things that are more confusing like picking fights with Mexico, Iran and Australia."

The Washington Post reported that a call between Trump and Australian Prime Minister Malcolm Turnbull on Saturday did not go well. U.S. officials told the Post that Trump informed Turnbull, a former Goldman Sachs investment banker, that he had conversed with other political leaders earlier in the day and that "this was the worst call by far."

"It's a recognition by the market that someone in a very influential position, i.e. the president, is unorthodox. People are still learning how to deal with him," said Jeremy Klein, chief market strategist at FBN Securities.

Meanwhile, on Wednesday, National Security Adviser Michael Flynn said the administration put Iran "on notice" after conducting a ballistic missile test. Trump tweeted Thursday morning, reinforcing Flynn's remarks.

@realDonaldTrump: "Iran has been formally PUT ON NOTICE for firing a ballistic missile.Should have been thankful for the terrible deal the U.S. made with them!"

"It was expected that Trump's administration wouldn't be able to maintain the same relationships which were developed by Obama after years of work. These tensions could make investors a little nervous and we could see the oil market becoming volatile once again. Trump's administration has put Iran on official notice but no one really know what this really means," said Naeem Aslam, chief market analyst at Think Markets in London.



"Nonetheless, we think this news is sufficient to bring more instability for the price of oil, and if the US puts the sanctions back on Iran, it may create more problems for its EU partners," he said.

Equities have rallied sharply since the U.S. election, with the Dow, S&P and Nasdaq rising 8.5 percent, 6.54 percent and 7.24 percent, respectively, since then. This week, however, the major indexes were on track to post weekly losses.

"I think the markets were spooked by Trump's immigration ban and there haven't been many positive news to push them back to the uptrend," said Randy Frederick, vice president of trading and derivatives at Charles Schwab.

Investors also focused on economic data, as initial jobless claims fell 14,000 to 246,000. The print is also below a consensus estimate of 250,000. Fourth-quarter non-farm productivity rose 1.3 percent.

U.S. Treasury yields were mixed, with the benchmark 10-year note yield near 2.47 percent and the short-term two-year note yield around 1.21 percent. The dollar rose 0.15 percent against a basket of currencies, with the euro near $1.076 and the around 112.74.