Ecolab Inc., a global company based in St. Paul, says it’s going all solar in Minnesota.

The company said Monday that it signed a deal with renewable energy developer SunEdison to acquire enough solar-generated electricity to offset virtually every watt of electricity used in its Minnesota business operations.

Ecolab, a seller of hygiene, energy and water technologies to businesses, is the first big Minnesota company to go all-in on solar. With this deal, Ecolab will acquire more solar output than now exists across the entire state.

“It makes business sense to do this,” said Raj Rajan, vice president of global sustainability at Ecolab, which employs 2,500 people in Minnesota and 45,000 worldwide.

The deal by Ecolab, a Fortune 500 company, is the most dramatic evidence that a solar boom is looming in Minnesota. A 2013 state law requires investor-owned utilities to get 1.5 percent of their power from the sun by 2020. The law also authorized market-driven solar projects, known as community solar gardens, whose output is shared by interested subscribers — like Ecolab.

“It’s groundbreaking in many ways,” Ken Johnson of the Solar Energy Industries Association, a Washington, D.C., trade group, said of the Ecolab-SunEdison deal. “When people think of solar they tend to think of places like California, Arizona, Hawaii and Florida. They don’t traditionally think of the Midwest. This is going to open up a lot of eyes.”

Many U.S. companies have made large solar investments, including Wal-Mart and Target, though not in Minnesota. Kohl’s, the retailer based in Menomonee Falls, Wis., offsets all its electricity use with rooftop solar panels and purchased solar credits.

Sam Youneszadeh, a managing director at SunEdison, whose solar unit is based in Belmont, Calif., said the deal with Ecolab is the first stage of SunEdison’s plan to build 200 megawatts of solar gardens on 15 to 20 sites in the Twin Cities area. Once they are built — sometime next year — the projects will be owned and operated by TerraForm Power, a renewable energy company based in Bethesda, Md.

In an interview, Youneszadeh declined to say how much Sun­Edison is investing in Minnesota. But he said the company is lining up other subscribers for its planned solar gardens, which will be built on the ground rather than on rooftops. He didn’t identify any other customers.

Community solar gardens have acres of solar panels whose power output is shared by residential and business customers who voluntarily subscribe under a favorable pricing structure. Under the rules, each solar garden must have at least five subscribers and no subscriber can take more than 40 percent of the garden’s output.

Ecolab’s deal is for 16 megawatts of solar power. That compares with about 14 megawatts of statewide solar capacity today. But it is still short of Wal-Mart, which has 105 megawatts of solar capacity, the most of any U.S. company.

Michael Noble, executive of Fresh Energy, a St. Paul nonprofit that backed the state solar law, said it offers a “forward-looking strategy” for corporations, many of which have made sustainability part of their missions. “Ecolab is smart to lock in on long-term, stable, carbon-free energy,” Noble said.

Rajan of Ecolab said it’s the first solar investment for the company. He declined to speak in detail about the pricing, but said the 25-year power purchase agreement offers protection from the ups and downs of energy prices. Ecolab signed up to buy more power than it typically uses at any one moment. That extra electricity offsets the power the company takes off the grid when the sun doesn’t shine.

In SunEdison’s first solar gardens, Ecolab will take the maximum-allowed 40 percent of the output. “We are like an anchor tenant in the mall,” Rajan said. “I think it will be fantastic to see other, fellow corporations in the cities do the same thing. It is very exciting.”

Ecolab, which had worldwide sales of $13.3 billion in 2013, began in the 1920s selling a product to clean carpets. It still sells cleaning and sanitizing products and services, but has expanded into many sectors, including water management, food safety, pest elimination and equipment maintenance and repairs.

About 26 percent of Ecolab’s business is in energy, including products and services for the oil and gas and petrochemical industries. Its other major U.S. operations are in Illinois, Ohio and Texas.

In Minnesota, Rajan said, Ecolab also has a research and development center in Eagan and other operations in Duluth and four other metro-area cities.