New York State, which last month passed an ambitious law to reduce the emissions that cause climate change, said Thursday that it had reached an agreement for two large offshore wind projects.

The wind projects, to be built off the coast of Long Island, represent a big step forward for a technology that has been slow to take off in the United States because of local opposition and high costs. Experts have said offshore turbines, which are used extensively in Northern Europe, hold great promise because the wind tends to be stronger and more consistent offshore than on land.

Wind farms are a major energy source in the United States, providing about 7 percent of all electricity last year, up from about 2 percent in 2010. But almost all of those turbines are on land. By comparison, Britain expects to get 10 percent of its electricity from offshore wind next year, up from less than 1 percent in 2010.

The New York projects will start operation within the next five years and have the capacity to produce 1,700 megawatts of electricity, accounting for about 20 percent of Gov. Andrew Cuomo’s overall goal for offshore wind.