An ambitious project by a California company to install solar panels for more than 100,000 military housing units has been revived with private financing after it failed to receive a loan guarantee from the federal government.

The company, SolarCity, plans to announce Wednesday that Bank of America Merrill Lynch will lend it up to $350 million to put solar electric panels on roofs and other areas to power as many as 120,000 homes for military personnel over the next five years.

Under the program, which would roughly double the number of homes with solar power if fully carried out, SolarCity will install, operate and own the solar systems, said Lyndon Rive, the company’s chief executive. Customers will pay the company for the electricity they use, with any unused power feeding back to the military bases.

The San Mateo, Calif., company had originally hoped to serve up to 160,000 homes with the help of a loan guarantee from the Obama administration. In early September the energy secretary, Steven Chu, announced preliminary approval of a guarantee that would have covered $275 million of a $344 million loan from Bank of America Merrill Lynch for the program, called SolarStrong.