Data on German private-sector growth reassured investors about the outlook for Europe's biggest economy following a soft patch, while a batch of U.S. reports showed economic strength early in the third quarter.

Markit's flash composite Purchasing Managers' Index for Germany was 54.9 for August, well above the 50 mark that indicates economic expansion, a relief after German GDP data last week showed a surprise contraction in the second quarter.

In the United States, home resales rose to a 10-month high in July, factory activity in the mid-Atlantic region hit its highest level since March 2011 in August, and a gauge of future economic activity grew solidly last month.

The benchmark S&P 500 rose as high as 1,992.65 points, topping the prior record of 1,991.39 set in late July, and European markets extended earlier gains. MSCI's measure of global equity performance <.MIWD0000PUS> also rose, but its measure of emerging markets <.MSCIEF> slipped a bit.

"It seems that conditions reflect the best of all worlds - U.S. economic growth that is neither too slow, which would put pressure on earnings, nor too fast," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management in Minneapolis.

The Dow Jones industrial average <.DJI> rose 71.54 points, or 0.42 percent, to 17,050.67. The S&P 500 <.SPX> gained 4.93 points, or 0.25 percent, to 1,991.44 and the Nasdaq Composite <.IXIC> was flat, down 0.13 points, or -0 percent, to 4,526.35.

In Europe, the FTSEurofirst 300 <.FTEU3> index of top regional shares rose 0.67 percent to close at 1,355.09 points.

While stocks might be a tad pricey, earnings growth will continue to support U.S. equities, said Bernie Williams, chief investment officer of investment solutions at USAA Investments in San Antonio, Texas.

"Right now the latest consensus is 8 or 9 percent earnings growth, I think that's what propels the market going forward," Williams said.

The German data helped the euro rebound against the dollar, rising 0.17 percent to $1.3281. Against the yen, the dollar gained 0.11 percent to 103.84 yen.

U.S. Treasuries hewed to a tight range, showing little reaction to the stronger-than-expected U.S. economic data. Investors awaited developments from the annual meeting of central bankers in Jackson Hole, Wyoming, which begins late Thursday.

A speech on Friday by Federal Reserve Chair Janet Yellen, when she is expected talk about labor markets, is highly anticipated by investors.

Benchmark 10-year U.S. Treasuries rose 2/32 in price to yield 2.4193 percent.

U.S. crude rose and Brent futures pared losses, lifted by the U.S. economic data after a plentiful supply picture.

Brent crude for October rose 25 cents to $102.53 a barrel, while U.S. crude rose 89 cents to $94.34 a barrel.

(Reporting by Herbert Lash; Additional reporting by Marc Jones in London; Editing by Leslie Adler)

By Herbert Lash