New York City Mayor Michael Bloomberg defended on Tuesday a Florida pastor's right to burn copies of the Quran during a public demonstration on the ninth anniversary of the Sept. 11 terrorist attacks.

"In a strange way I'm here to defend his right to do that. I happen to think that it is distasteful. I don't think he would like it if somebody burnt a book that in his religion he thinks is holy," Mr. Bloomberg said during a news conference updating the public on the progress of rebuilding at the World Trade Center site.

"But the First Amendment protects everybody," Mr. Bloomberg said, "and you can't say that we're going to apply the First Amendment to only those cases where we are in agreement."

Terry Jones, pastor at the Gainesville, Fla.,-based Dove World Outreach Center, a 50-member Christian church, ignited a firestorm when he recently announced plans to burn copies of the Muslim holy book this Saturday to mark the anniversary of the terrorist attacks. The proposed public torching has already sparked protests in Afghanistan, and NATO Secretary-General Anders Fogh Rasmussen, among others, warned Tuesday it could put Western troops there at risk.

The church has been denied a city permit for the demonstration, but the pastor has said he plans to go forward with the protest.

Mr. Bloomberg noted in his remarks that burning copies of the Quran could put "our young men and women overseas and America itself in greater danger than it was already." Still, he said, a commitment to free speech means it must be permitted.

"If you want to be able to say what you want to say when the time comes that you want to say it, you have to defend others no matter how much you disagree with them," Mr. Bloomberg said.

In recent months, Mr. Bloomberg has become an outspoken advocate of a controversial proposal to build a mosque and Islamic cultural center two blocks from Ground Zero in Lower Manhattan. There is "nowhere in the five boroughs of New York City that is off limits to any religion," Mr. Bloomberg said during a speech at an annual Iftar dinner at Gracie Mansion last month.

Write to Michael Howard Saul at michael.saul@wsj.com