NEW YORK, Jan 8 (Reuters) - Investors in U.S.-based mutual funds poured $6 billion into stock funds in the closing days of 2013 as the U.S. stock market produced a final stretch of record gains for the year, data from the Investment Company Institute showed on Wednesday. The inflows into stock funds in the eight-day period ended Dec. 31 marked the strongest demand for the funds in seven weeks, according to data from ICI, a U.S. mutual fund trade organization. Funds that specialize in U.S. stocks attracted $3.3 billion of the total inflows, also marking the strongest demand in seven weeks. Funds that specialize in non-U.S. stocks attracted $2.7 billion, up modestly from the previous week's inflows. The Standard & Poor's 500 stock index ended the year at a record high, notching a yearly rise of 29.6 percent and its best year since 1997. The Federal Reserve's $85 billion in monthly bond-buying stimulus kept interest rates low, leading investors to seek higher income in stocks. Investors poured $167.5 billion into stock funds in 2013, according to preliminary ICI estimates. That marked the largest annual inflows into the funds since 2004. Inflows of $143.2 billion into funds that hold non-U.S. stocks trounced inflows of $24.4 billion into funds that hold U.S. stocks. The MSCI world equity index also posted a strong 2013, rising 20.2 percent. While stock funds attracted inflows over the latest period, investors pulled about $2.9 billion from bond funds, marking the 14th straight week of withdrawals from the funds. Those outflows were the smallest in 10 weeks, however. Through the end of the year, the yield on the benchmark 10-year U.S. Treasury rose about 140 basis points from a yearly low of 1.62 percent on May 2. Investors sold bonds on fears that a pullback in the Fed's bond-buying would cause bond yields to spike higher. Bond yields move inversely to their prices. Investors pulled $81.1 billion from bond funds in 2013, preliminary estimates from ICI show. That marked the biggest annual outflows from the funds in at least three decades, according to ICI data. Hybrid funds, which can invest in stocks and fixed income securities, attracted $1.1 billion in the latest period, marking the biggest inflows into the funds in six weeks. The following table shows estimated ICI flows for the past five weeks (all figures in millions of dollars): 12/4 12/11 12/18 12/23 12/31 Total Equity 2,055 -1,203 171 2,466 6,003 Domestic -1,050 -4,525 -2,814 952 3,315 World 3,106 3,322 2,985 1,514 2,688 Hybrid* 957 864 441 827 1,091 Total Bond -3,181 -6,874 -8,090 -3,464 -2,851 Taxable -1,874 -4,299 -5,568 -2,064 -404 Municipal -1,307 -2,575 -2,522 -1,400 -2,447 Total -168 -7,213 -7,477 -172 4,243 * Hybrid funds can invest in stocks and/or fixed-income securities.