By Herbert Lash

NEW YORK (Reuters) - The yen eased against the dollar on Wednesday after Japan unveiled a surprisingly large $265 billion stimulus package, while U.S. equity markets mostly declined following the Federal Reserve's decision to leave interest rates unchanged.

The Fed said at the end of a two-day meeting of its policy-setting Federal Open Market Committee that near-term risks to the U.S. economy had diminished, a view that could open the door to a resumption of monetary policy tightening this year.

The U.S. central bank said the economy had expanded at a moderate rate and job gains were strong in June. It added that household spending also had been "growing strongly" and pointed to an increase in labor utilization.

The Fed's statement was broadly constructive about the economy and the absence of any mention of international risks was notable, said Brad McMillan, chief investment officer at Commonwealth Financial in Waltham, Massachusetts.

"There is no hat tip toward a September rate increase. There is no signal there," McMillan said. "So in many respects I see this as a Goldilocks statement from a market perspective."

The benchmark S&P 500 index and Dow industrials closed slightly lower, reversing modest gains after the Fed statement.

The technology-rich Nasdaq was boosted by Apple <AAPL.O>, which said it sold more iPhones than expected in its third quarter and gave an upbeat forecast.

Apple's shares surged 6.58 percent to $103.03.

Company earnings have been better than expected on the whole and currency doesn't seem to be playing as much of a role as it had in previous quarters, said Rahul Shah, chief executive of Ideal Asset Management in New York.

"The fact that the Fed is on the back burner is bullish for the stock market," Shah said.

The Fed had not been expected to boost rates but investors sought clues for when a move might occur as uncertainty is high after Britain's vote last month to leave the European Union and as the U.S. presidential election in November looms large.

The Dow Jones industrial average <.DJI> closed down 1.58 points, or 0.01 percent, to 18,472.17. The S&P 500 <.SPX> slid 2.6 points, or 0.12 percent, to 2,166.58 and the Nasdaq Composite <.IXIC> added 29.76 points, or 0.58 percent, to 5,139.81.

MSCI's all-country world stock index <.MIWD00000PUS> gained 0.06 percent. In Europe, where markets closed before the Fed's statement was released, shares gained led by auto stocks and luxury group LVMH <LVMH.PA> after its second-quarter sales beat forecasts.

The pan-European FTSEurofirst 300 <.FTEU3> closed up 0.36 percent at 1,351.75.

In Japan, the earlier-than-expected announcement to boost the flagging Japanese economy lifted Asian stock markets but weighed on the safe-haven yen. The 28-trillion yen package exceeded initial estimates of about 20 trillion yen.

The benchmark Nikkei average <.N225> closed up 1.72 percent while the broader Topix <.TOPX> gained 1.13 percent.

The yen <JPY=> was last down 0.47 percent at 105.13 per dollar. The euro <EUR=> rose 0.65 percent to $1.1057.

The benchmark 10-year U.S. Treasury note <US10YT=RR> rose 17/32 in price to push yields lower at 1.5027 percent as a record drop in German yields made U.S. debt enticing to European investors. The spread between shorter-dated and long-dated Treasury yields contracted after the Fed statement.

In European debt markets Germany's long-term borrowing costs hit a record low as demand for its 30-year bonds soared on expectations it will be a prime target for central bank purchases.

Berlin sold 1 billion euros of the debt maturing in 2046 at 0.45 percent, the lowest average yield ever at an auction. Yields traded even lower after the sale, down 5 basis points on the day at a two-week trough of 0.41 percent

Oil prices tumbled more than 2 percent after the U.S. government reported a surprise build in crude and gasoline inventories during the peak summer driving season.

Brent <LCOc1> settled down $1.40 at $43.47 a barrel. U.S. crude <CLc1> fell $1.00 to settle at $41.92 a barrel.

(Reporting by Herbert Lash; Editing by Nick Zieminski and Meredith Mazzilli)