Small farms in Japan are struggling to survive. Rural populations are shrinking, and the average farmer is 67 years old. But two new farms will test a different business model to try to reinvigorate the sector: solar panels with mushrooms growing underneath them.

The farms, at two locations in northeastern Japan, will produce a combined 4,000 kilowatts of solar power that will be sold to a local utility, while the mushroom farms will yield an annual 40 tons of cloud-ear mushrooms, a crop that is typically imported from China.

“The environment needs to be dark and humid for mushrooms to spawn,” says Minami Kikuchi, who leads the “solar sharing” project that combines agriculture and solar power at Sustainergy, a renewable energy startup. “We simply created the suitable environment for them by making use of vacant space under the solar panels.” The company is working with Hitachi Capital, a leasing specialist that will provide the panels, and Daiwa House Industry, which will construct and maintain them.

“There is no doubt that Japanese agriculture is facing a serious crisis–the average age of Japanese farmers has been rising, and abandoned farmland has been expanding, mainly due to severe economic position of farmers,” Kikuchi writes Fast Company in an email. “To make improvements in this situation, we designed the project of combination with solar farms at large scale so that farmers could obtain additional stable income. Of course, this renewable energy technology is contributing to the sustainable development of Japan too.”

Today, an estimated 10% of Japanese farmland is not in use, despite the fact that the majority of food is imported. Government tariffs have discouraged companies from converting farmland to solar power generation, but a partial change in regulations in 2013 meant that solar power was more viable–provided that it was constructed in combination with agriculture, rather than replacing it.

Sustainergy believes that similar farms could potentially grow other crops that need little light, such as potatoes. In the U.S., researchers at the University of Massachusetts are exploring the possibility of growing a much wider range of crops; a farm in South Deerfield has spent the last two years growing plants like kale, broccoli, and Swiss chard under rows of nine-foot-high solar panels.

In unusually hot weather, the researchers found, shade from the panels actually helps the plants, and despite getting less sun, yields can be essentially the same as for plants in an open field. In more typical weather, tests so far indicate the yields may be only somewhat reduced. A farmer could make up the financial difference by selling electricity, while preserving valuable farmland.