Until this week, all of the wind power generated in the United States was on land.

But in a first for America, the ocean breeze is now generating clean, renewable power offshore — electricity that will supply a small island community off the coast of Rhode Island. Renewable energy, including from offshore wind, is crucial to the effort to avoid some of the worst effects of climate change, according to environmentalists and some elected officials.

On Monday, the country’s first offshore wind farm, developed by a company called Deepwater Wind and helped along by the state’s political leadership, started spinning its turbines to bring electricity to Block Island, a vacation destination with few year-round residents that had previously relied on diesel-fueled generators for power.

“This is a historic milestone for reducing our nation’s dependence on fossil fuels, and I couldn’t be more thrilled that it’s happening here in the Ocean State,” Senator Sheldon Whitehouse, Democrat of Rhode Island and co-founder of the Senate Climate Action Task Force, said in a statement from Deepwater Wind.

Though the Block Island Wind Farm is small — made up of five turbines, which were built by a division of General Electric, and capable of powering about 17,000 homes — it is the first successful offshore wind development in the United States, and it sets up the possibility for offshore wind projects elsewhere along the coast.