New York State’s sweeping ban on smoking cigarettes in state parks was upheld Thursday by the state’s highest court.

The Court of Appeals ruled that the Office of Parks, Recreation and Historic Preservation did not overstep its authority when it barred people from smoking cigarettes at its nearly 215 parks and historic sites.

Parks Commissioner Rose Harvey said in a statement: “As today’s decision unanimously affirms, no smoking in designated areas of State Parks is a sound public policy that protects public health and safety, and makes our pools, playgrounds, beaches and other outdoor facilities healthier and cleaner places for all.”

A parks spokesman had no immediate comment on whether the agency now might restrict electronic cigarettes.

Over the years, the National Park Service increasingly has limited smoking; last year, e-cigarettes were folded into regulations that allow visitors to light up, except when and where the superintendent already has barred smoking.

Smoking, for example, is prohibited if it imposes a burden on maintenance workers, might cause fires or other damage or prompt conflicts among visitors, who are on group hikes, for example, Jeffrey Olson, a National Park Service spokesman, said by email.

And no smoking is allowed in caves and caverns.

Similarly, in 2014 New York City added e-cigarettes to its ban on smoking in parks.

advertisement | advertise on newsday

That year, Nassau joined Suffolk in enacting a smoking ban, ensuring that playgrounds, athletic fields, county preserves and the like were off limits. But smoking still was allowed at golf courses and in parking lots.

The state parks department first proposed its smoking ban in 2012, saying it was “needed to allow all of [its] patrons to enjoy the outdoors, breathe fresh air, walk, swim, exercise and experience amenities and programs without being exposed to secondhand smoke and tobacco litter,” the court said.

A pro-smoking advocacy group, NYC Citizens Lobbying Against Smoker Harassment, filed a lawsuit and successfully persuaded the trial court that the agency had violated the separation of powers doctrine, usurping the legislature’s role.

@Newsday

However, the appellate court overturned that decision, and the Court of Appeals agreed with it, ruling that lawmakers gave the parks department the power to “provide for the health, safety, and welfare of the public in connection with its oversight of the state park system.”