After two back-to-back months of outflows, U.S. equity ETFs are staging a comeback, but fixed income ETFs are the investment of choice.

They attracted $15.3 billion in inflows in April, the second highest monthly inflows ever recorded — only the $17 billion record in October 2014 was greater — while equity ETFs attracted $10 billion following two straight months of outflows, according to State Street Global Advisors. It was the third consecutive month that fixed income inflows outpaced equity inflows, and active bond ETFs accounted for almost two-thirds of bond inflows.

(Related: US ETFs Bleed Assets 2 Months Running)

Commodity ETFs trailed both asset classes, with inflows of nearly $2.3 billion — three-quarters of which moved into precious metals.

While investors  weren’t avoiding risk in April they appear to be trying to temper it. In addition to investing in more in bond funds than equity ETFs and in precious metals ETFs they favored government and investment-grade bonds over all other fixed income funds.

(Related: Mutual Fund and ETF Fees Fall to Record Lows: Morningstar)

Government bond ETFs attracted $6.7 billion in inflows while investment-grade corporate bond ETFs attracted $3.2 billion. Ultra short-term fixed income ETFs were the most popular among maturity levels, which makes sense given the steady rise in both short-term and long-term rates since the beginning of the year.

(Related: First S&P 500 Bond ETF Is Launched)

Long-term bond ETFs with maturities above 10 years, however, also attracted inflows, of $1.7 billion despite rising rates and the 10-Year Treasury yield breaking above 3% in late April (before retreating slightly).

“This may point to investors believing that the 3% breakthrough may not hold,” wrote Matthew Bartolini, head of SPDR Americas Research at State Street in the April report.

(Related: Readying for Higher Interest Rates)

Even high-yield bond ETFs saw inflows in April, breaking a record-setting five months of outflows. Preferred debt and emerging market bonds were the only fixed income categories with outflows in April, and preferred and high-yield debt were the only two debt categories posting outflows year to date. 

Among equity ETFs, large-cap ETFs attracted the biggest inflows in April —  $5.65 billion versus $1.7 billion into small caps — but not enough to offset outflows in previous months, which in total are down $237 billion. Flows into U.S. stock ETFs were substantially higher than flows into international ETFs in developed markets ($3.4 billion) and emerging markets ($2.6 billion).

Despite the popularity of fixed income ETFs in April and outflows from equity ETFs earlier this year, year-to-date data show that equity inflows, at $56.9 billion, were almost twice as much as fixed income ETF inflows, at $31.6 billion.

— Check out Investors Favor Bond ETFs Over Stock ETFs for 3rd Straight Month on ThinkAdvisor.