After a bitter debate over individual liberties and the role of government, the City Council on Wednesday handily approved a bill to ban smoking in 1,700 city parks and along 14 miles of city beaches.

By a 36-to-12 vote, the Council passed the most significant expansion of antismoking laws since Mayor Michael R. Bloomberg pushed to prohibit smoking in restaurants and bars in 2002.

The Council speaker, Christine C. Quinn, said the ban was an affirmation of the rights of nonsmokers. “Their health and their lives should not be negatively impacted because other people have decided to smoke,” Ms. Quinn said at a news conference.

Opponents of the bill spoke strongly against it; several members derided it as an overly broad law that would infringe on individual liberties.