America’s long struggling solar panel sector received a major shot in the arm after SolarCity Corp. said it would build one of the world’s largest solar manufacturing facilities on U.S. turf.

The California solar firm, chaired by entrepreneur Elon Musk, told investors Tuesday that it had acquired solar panel maker Silevo and would launch a 1,000-megawatt factory near Buffalo, New York within the next two years—the first of what could be a handful of massive solar plants in the near future.

The news elicited excitement from investment bankers and solar industry experts, who are more recently accustomed to hearing of bankruptcies and layoffs than expansions. Cheaper labor and equipment costs overseas, namely in China, have made it difficult to produce panels in the U.S. Dozens of American companies have folded partly as a result, while many remaining firms have shifted their own production abroad.

Until now, SolarCity focused mainly on installing and financing rooftop solar systems, rather than producing the actual hardware. The company in recent years has helped propel the residential solar market by offering affordable financing and leasing options, saving customers the burden of spending $30,000 and upwards to purchase a new installation.

By making its own solar panels, SolarCity aims to further drive down the costs of rooftop solar systems so that clean electricity can compete with fossil fuel power, its top management said. News site Vox likened this approach to the “Apple model” of vertical integration.

“Our intent is to combine what we believe is fundamentally the best [solar] photovoltaic technology with massive economies of scale to achieve a breakthrough in the cost of solar power,” Musk wrote in a blog with SolarCity co-founders Lyndon Rive, the CEO, and Peter Rive, the chief technology officer.

Analysts expressed initial confidence that SolarCity’s entry into the bumpy world of solar manufacturing is a smart move. "I can't imagine a company so focused on cutting costs making an acquisition like this if they weren't convinced it would be cost competitive," Shayle Kann, vice president of GTM Research, told Greentech Media.

SolarCity said it will acquire Silevo for as much as $350 million in an all-stock deal. Silevo’s panels are highly efficient, meaning that they can convert more sunlight into electrical output than standard technologies. The start-up has already begun work on an initial 200-megawatt factory in Buffalo, which SolarCity said it will scale up five-fold.

Musk said the planned 1,000-megawatt factory “is almost like a pilot plant for what will come,” he told investors on a conference call. Future plants, whose locations are still undetermined, could be on the order of 10,000 megawatts in panel production capacity.

The United States has more than 13,000 megawatts of cumulative solar capacity in operation, enough to power more than 2.2 million average American homes, according to the Solar Energy Industry Association, a trade group.