NEW YORK (Reuters) - Major global stock markets fell slightly on Wednesday as investors took profits after record gains, while U.S. Treasury yields reached nine-month highs, as a $1.5 trillion tax bill cleared both chambers of the Republican-led U.S. Congress.

The German share price index, DAX board, is seen at the stock exchange in Frankfurt, Germany, December 19, 2017. REUTERS/Staff/Remote

The legislation, which would enact the biggest U.S. tax code overhaul in more than three decades, heads to President Donald Trump for signing, although the timing was unclear.

The U.S. House of Representatives voted for a second time to pass the sweeping bill Wednesday afternoon, hours after the Senate approved it.

The bill will slash the corporate income tax rate to 21 percent from 35 percent, which analysts say will boost business earnings and lead to higher dividends and stock buybacks.

U.S. stocks rallied in the days ahead of voting on the bill, introduced six weeks ago, but some investors have begun to sell.

The Dow Jones Industrial Average .DJI fell 28.1 points, or 0.11 percent, to end at 24,726.65, the S&P 500 .SPX lost 2.22 points, or 0.08 percent, to 2,679.25 and the Nasdaq Composite .IXIC dropped 2.89 points, or 0.04 percent, to 6,960.96.

MSCI's gauge of stocks across the globe .MIWD00000PUS shed 0.06 percent.

European stock markets fell .STOXX 0.7 percent, with blue-chip indexes in Berlin .GDAXI, Paris .FCHI and London .FTSE 0.3 to 1.1 percent lower. The pan-European FTSEurofirst 300 index .FTEU3 also lost 0.70 percent.

Japanese stocks inched up slightly as strength in financials offset a sustained sell-off in construction shares. The Nikkei share average .N225 edged up 0.1 percent to 22,891.72 after trading in the red.

Government bond yields, which move inversely to their prices, have jumped in the United States and Europe on expectations tax reform would help boost economic growth and inflation.

U.S. Treasury yields rose to nine-month highs as the bill passed.

Benchmark 10-year U.S. Treasury notes US10YT=RR were last down 10/32 in price to yield 2.497 percent, from 2.463 percent late Tuesday. The 30-year bond US30YT=RR was last down 1-3/32 to yield 2.8767 percent, from 2.823 percent.

Euro zone government bonds sold off sharply for a second straight day.

The U.S. dollar slid against most currencies except the Japanese yen JPY= on expectations the tax bill's upside impact on the greenback had been factored into the market.

Gains in the dollar were limited versus the yen, as the market looked to Thursday’s outcome of the Bank of Japan’s two-day policy meeting for clues to whether it will join the Federal Reserve and European Central Bank in winding back stimulus.

The dollar index .DXY fell 0.12 percent. That led the euro EUR= to rise 0.31 percent to $1.1875. The dollar also fell against sterling GBP= and the Canadian CAD= and New Zealand NZD= dollars.

The weaker dollar pushed up gold prices for a fourth straight session to hit a two-week high. Spot gold XAU= added 0.3 percent to $1,265.45 an ounce. U.S. gold futures GCcv1 gained 0.37 percent to $1,268.90 an ounce.

Crude prices rose, supported by a larger-than-expected drop in U.S. inventories and a continued outage in the North Sea Forties pipeline system. [O/R]

West Texas Intermediate crude futures CLc1 rose 50 cents to $58.06 a barrel while Brent crude LCOc1 rose 73 cents at $64.53.