The biggest apartment building in ­Connecticut, 360 State Street is a mixed-income tower that produces its own energy.

The fuel cell in the basement of 360 State Street is the size of a boxcar. It weighs 60,000 pounds and cost $4 million to purchase and install.

But the huge fuel cell has been operating at only half strength since the 32-story apartment tower opened in New Haven, Conn., in 2010. That will soon change, however, thanks to new state legislation that allows the property to generate electricity and then sell it to residents.

The cell was designed to supply heat and electricity to all 500 of the mixed-income property’s apartments. But local officials had ruled that the building could not submeter electricity to its residents, sparking a three-year battle. That struggle ended July 9, when Connecticut governor Dannel Malloy signed legislation to permit the installation of submeters in buildings such as 360 State Street that produce renewable energy.

The 400-kilowatt fuel cell generates heat and electricity from hydrogen that it separates out of the natural gas piped into the building. The power is 99 percent cleaner than oil and natural gas, says the developer.

Now that 360 State Street can submeter, the fuel cell should pay for itself in just four years with help from a federal fuel cell tax credit worth 30 percent of the cost of the system. Without this incentive, it would probably take 10 years to pay for itself, says Bruce Becker, president of development and architecture firm Becker+Becker, based in Fairfield, Conn.

Other green features of the LEED Platinum–­certified tower include high-­performance windows and insulation.

The $180 million development includes 50 units of affordable housing reserved for residents earning low or moderate incomes. These units received $2 million in HOME funds and another $2 million in state housing trust funds. However, that subsidy—$80,000 per unit—is nowhere near the $360,000-per-unit development cost.

The remaining 450 apartments lease at higher-end rents, starting at $1,750 for a 519-square-foot studio.

The building’s affordable units helped Becker+Becker win the competition to build on a site ­effectively donated by the city. Nine developers answered the city’s request for proposals to build on the site.

“We committed to providing more affordable housing than any of the other plans,” says Becker. “That was one of the things that led the city to give us the land for a dollar.”