Charleston City Council Tuesday joined the growing list of communities to come out against drilling for oil and natural gas off the coast of South Carolina.

The group voted 7-5 to support a resolution opposing seismic testing and offshore drilling. With the vote, the city joined at least 40 other coastal communities that have made similar moves in the past few months, including James Island, Hilton Head Island, Folly Beach, Isle of Palms, Edisto Beach, Beaufort and Port Royal.

Dozens of environmental advocates attended the meeting to encourage members to pass the resolution before the federal Bureau of Ocean Energy Management’s public comment period comes to a close at the end of the month. The bureau is taking comments on what issues should be studied in developing an environmental impact statement on drilling off the Atlantic coast.

Opponents of offshore drilling say spills could hurt the environment and the coastal tourism industry. Supporters say energy development will create jobs and revenue for the states, and that oil drilling can be done safely.

Hamilton Davis, the Coastal Conservation League’s energy and climate director, said the testing, where airguns would be used to send sound waves through the water, will harm wildlife.

And there is the danger of oil spills, he said, referring to the BP Deepwater Horizon oil spill in the Gulf of Mexico in 2010. “What did we hear just before that spill?” Davis asked. “We heard the industry is safe.”

Mari Bishop, a College of Charleston student, said opposition is coming from students and average citizens, not only environmental experts. “Any economic benefit would mean next to nothing if we had an oil spill,” she said.

But Kay Clamp, executive director of the South Carolina Petroleum Council, said 30 years ago, seismic testing had negative effects, but that’s no longer true. Even the wind energy industry uses seismic testing, she said.

And the industry brings economic development, she said. “The jobs issue is a very, very big one.”

Council members who voted against the resolution — Gary White, Aubry Alexander, Bill Moody, Marvin Wagner and Dean Riegel — said they wanted more time to hear all of the facts and would have preferred deferring the vote.

Reach Diane Knich at 843-937-5491 or on Twitter at @dianeknich.