The 4-to-1 vote came after nearly two hours of passionate debate.
Opponents of the legislation called it divisive and possibly illegal, while supporters contended that the growing population of illegal immigrants in the town has damaged the quality of life.
"We must draw the line, and we are doing it tonight," Mayor Lou Barletta told a packed city council chambers.
Barletta proposed the Illegal Immigration Relief Act last month as a response to what he said were Hazleton's problems with violent crime, crowded schools, hospital costs and the demand for services.
The ordinance would deny licenses to businesses that employ illegal immigrants, fine landlords $1,000 for each illegal immigrant discovered renting their properties, and require city documents to be in English only.
"The illegal citizens, I would recommend they leave," Barletta said after the meeting.
"What you see here tonight, really, is a city that wants to take back what America has given it," said the mayor, who said he wore a bulletproof vest to the meeting. He said he had not been threatened but took precautions because the issue was such an emotionally charged one.
"I think it's good for Hazleton, and I think it's good for the country," council president Joseph Yannuzzi said.
Outside City Hall, about 300 people gathered with opponents of the measure, some with signs that read "Bias," separated by a line of police from supporters, some waving American flags.
Anna Arias spoke at the council meeting against the ordinance. She asked the council, "Are any of us ready to support U.S. citizens born of someone who is undocumented?" Several people in the audience responded, "Yes!"
She warned the council that approving the ordinance would make Hazleton "the first Nazi city in the country."
"We're against illegal immigrants that are coming here and that are draining the resources of our city," he said.
The ordinance adopted at the meeting had been extensively amended from an earlier draft; one change would deny a license to any business that provides goods or services to an illegal immigrant. City solicitor Christopher B. Slusser said the provision would likely be invoked only against business people who knowingly violated it, and the city would deal with violators "on a case-by-case basis."
The Republican mayor's proposal has thrust the 31,000-population city to the fore of the national debate on illegal immigration.
The number of Hispanic residents in Hazleton, a former coal-mining town about 80 miles northwest of Philadelphia, has increased dramatically in the past six years.
City officials acknowledge they do not know how many are illegal immigrants, whom Barletta has blamed for higher crime rates, failing schools and a diminished quality of life.
Carolina Taveras, a 30-year-old naturalized citizen from the Dominican Republic who moved to Hazleton from New York City a year ago, said the mayor's proposal has made her feel unwelcome.
A few doors down from where Taveras was getting her hair done at a downtown beauty salon that caters to Hispanic women, restaurant owner George Giannakouros said he is sympathetic to Barletta's approach.
"I agree with the mayor, there is a problem," Giannakouros said. "I work at my business at night, I like to feel safe."
In a letter sent to Barletta earlier this week, attorneys with the Puerto Rican Legal Defense and Education Fund threatened to sue on the grounds that the ordinance infringes upon the federal government's power to regulate immigration.
The lone "No" vote was cast by councilman Robert Nilles, who expressed concern about the legality of the ordinance.
Nilles attempted to amend the vote by stripping out a portion regulating landlords, but it died for lack of a second.
The act passed the council 4-1 on a preliminary vote last month. A similar measure was approved Tuesday by the supervisors in Hazle Township, which surrounds the city of Hazleton.
Other municipalities across the country also have considered acting to address illegal immigration. Ordinances similar to the Hazleton measure have been proposed in the Florida communities of Palm Bay and Avon Park and the California towns of Escondido and San Bernardino.