(For a live blog on the U.S. stock market, click or type LIVE/ in a news window)

NEW YORK, Aug 31 (Reuters) - While the S&P boasted its steepest August percentage gain in more than three decades it ended Monday lower as investors took a pause although the Nasdaq rallied thanks to high-flying stocks including Apple Inc .

The Federal Reserve's commitment to tolerate inflation and keep interest rates low, positive developments in vaccines and treatments for COVID-19 and a rally in tech-focused stocks have helped the S&P 500 and Nasdaq hit record highs in August.

But while states such as New Jersey continued to ease restrictions on Monday, investors noted that across the United States, total coronavirus cases topped 6 million on Sunday as many states in the Midwest reported increasing infections, according to a Reuters tally.

"It's a momentum trade. People are flooding to the technology companies they think will do well regardless of the pandemic," said Chris Zaccarelli, chief investment officer, Independent Advisor Alliance.

"The U.S. just passed 6 million cases, a further reminder that the pandemic is here to stay until we do something about it. Clearly it has an impact on all businesses but some are more pandemic resistant," he said.

Unofficially, the Dow Jones Industrial Average fell 230.01 points, or 0.8%, to 28,423.86, the S&P 500 lost 8.11 points, or 0.23%, to 3,499.9 and the Nasdaq Composite added 79.82 points, or 0.68%, to 11,775.46.

With the S&P trading more than 3% above its pre-crisis, February record, Mona Mahajan, senior U.S. investment strategist at Allianz Global Investors in New York, said investors were showing some caution by favoring technology as they looked warily at U.S. and overseas COVID-19 numbers.

"After such a strong summer run we're reverting back to the old pandemic playbook so we see tech outperforming," she said. "Really that's a defensive move as people think about stay-at-home more as we're heading toward that fall season."

Nasdaq meanwhile traded more than 20% above its pre-crisis high. Its top two boosts were from Apple Inc and Tesla Inc which after their stock splits.

While the splits did not provide a fundamental reason to buy the stocks, Mahajan noted that the lower prices may be making the stocks more attractive to some retail investors.

The S&P ended the month with a gain of more than 7%, its biggest gain for August since 1986 when it gained when it rose 7.1% for that month.

But more than half of the S&P's 505 constituents were still in the red year-to-date.

The three main indexes showed their fifth straight monthly rise following March lows, even as economic data pointed to an uneven recovery from the steep downturn.

For the S&P, this was its longest winning steak on a monthly basis since a 6-month run from April to September 2018.

Aimmune Therapeutics Inc's shares soared after Swiss food group Nestle SA offered to pay $2 billion for full ownership of the peanut allergy treatment maker.

Shares of Microsoft Corp, Walmart Inc and Oracle Corp - all suitors for TikTok's U.S. assets - fell as China's new rules around tech exports meant a deal with TikTok owner ByteDance could need Beijing's approval. (Reporting by Sinead Carew in New York Additional reporting by Medha Singh and Devika Jain in Bengaluru Editing by Shounak Dasgupta and Matthew Lewis)