Doing good and saving for retirement may soon get easier.

BlackRock Inc. and Wells Fargo & Co. are developing their first-ever ESG funds for retirement savings plans, seeking to tap into growing demand for ethical investing. Both firms plan to create a series of target-date funds with this focus, according to people familiar with the matter, with BlackRock aiming to debut some later this year.

The asset managers are betting that a surge in interest in environmental, social or governance investing will carry through to 401(k)s, where there are few such options. While assets under management in ESG funds tracked by Bloomberg rose 37 percent in 2017 to more than $445 billion, less than 10 percent of 401(k) plans now offer such choices, according to Edward Farrington, executive vice president for retirement strategies at Natixis Investment Managers.

The move is aimed at spurring reluctant millennials to invest more for retirement. There's evidence that a younger generation of investors want such options and have yet to create a nest egg for the future. About two-thirds of millennials have saved nothing for retirement, according to a National Institute on Retirement Security report in February.

Farrell Denby, a BlackRock spokesman, declined to comment on specific plans. Under Chief Executive Officer Larry Fink, the New York-based firm has said companies should align their interests with societal needs. BlackRock engages with about 1,600 companies each year on a range of ESG issues and incorporates them into the company's investment analysis.

"As a fiduciary to our clients, BlackRock has a responsibility to protect and enhance the value of the assets they have entrusted to us," Denby said in an emailed statement. "We believe sustainability-related issues can play an important role in driving long term company strategy and economic performance, and thus carefully incorporating these considerations into the investment research and portfolio construction process can enhance long-term risk-adjusted returns."

A Wells Fargo spokesman, Robert Julavits, declined to comment. Its asset management unit oversees about $500 billion in assets.

Target-date funds, which offer a mix of investments and automatically rebalance as workers age, have become popular choices for investors. The category saw net inflows of $68 billion in 2017 and ended the year with $1.1 trillion in assets, according to data compiled by the Investment Company Institute. Over the past 10 years, net inflows have totaled $521 billion.

But fund managers expect it could take years to get ESG funds added to typically conservative retirement plans.

ESG funds are keeping pace with the broader market. Year to date, the iShares MSCI KLD 400 Social ETF (DSI) and the iShares MSCI USA ESG Select ETF (SUSA), among the biggest exchange-traded funds in the category, have gained 6.1 percent and 4.6 percent, respectively, on a total return basis. The iShares Core S&P 500 ETF (IVV) is up 5 percent.

BlackRock, the world's largest asset manager, and Wells Fargo see ESG as a growth engine for retirement assets even as the U.S. Labor Department has urged retirement plan sponsors to use caution in this area. In April, the department issued guidance to sponsors saying ESG investments may not always be "prudent."

Under the Obama administration, the Labor Department tried to remove perceived barriers to socially responsible investing by retirement funds.

The guidance could cause plan sponsors to think twice before implementing ESG strategies, according to Alex Bernhardt, U.S. head of responsible investment at consulting firm Mercer. Last month the U.S. Government Accountability Office also asked the Labor Department to clarify its latest guidance.

But firms like Natixis, the Boston-based unit of the French bank, are moving ahead with young investors in mind. The firm started the first suite of ESG target-date funds specifically for U.S. retirement savers last year after a survey of millennials found that 71 percent would put more money in retirement plans if they thought the investments were doing social good.