The Los Angeles City Council, protesting Arizona’s crackdown on illegal immigration, on Wednesday voted to ban most city travel to Arizona and future contracts with companies in that state.

During a morning-long debate on the resolution, council members compared Arizona’s action to Nazi Germany and the beginning of the Holocaust, as well as the internment and deportation of Japanese Americans during World War II. A new Arizona law, which will take effect July 23, will require police to determine whether people they stop are in the country illegally, which critics say will lead to racial profiling.

“Los Angeles the second-largest city in this country, an immigrant city, an international city. It needs to have its voice heard,’’ said Councilman Ed Reyes, one of the resolution’s sponsors. “As an American, I cannot go to Arizona today without a passport. If I come across an officer who’s having a bad day and feels that the picture on my ID is not me, I can be … deported, no questions asked. That is not American.’’

The action was approved 13-1, with Councilman Greig Smith casting the sole dissenting vote.

The council’s action fell short of a total boycott or canceling all of the city’s $58 million worth of contracts with Arizona companies. Officials with the Port of Los Angeles and Los Angeles International Airport expressed concern about potential effects on those agencies. The council asked boards overseeing the port, airport and city utilities to review all contracts with ties to Arizona, however.