BERKELEY — A Cal grad was elected as the first Sikh mayor of Hoboken, New Jersey this week, following a campaign marred by racist rhetoric and anonymous fliers depicting the ultimately successful candidate as a terrorist.

Ravinder S. “Ravi” Bhalla, 44, who already serves on the Hoboken City Council, beat five other candidates in the Nov. 7 mayoral election. A two-term councilman and an attorney, Bhalla was born and raised in New Jersey. He graduated from UC Berkeley with a bachelor’s degree in political psychology, according to his campaign website. He also has a master’s degree from the London School of Economics and a Juris Doctor degree from Tulane University Law School in New Orleans.

Bhalla’s victory resonated far beyond this city of about 54,000 residents across the Hudson River from New York City, becoming the subject of a report in the Hindustan Times of New Delhi, and noticed throughout the American Sikh community.

“I can’t tell you how much it means that my daughter will have civic heroes who look like her father,” Simran Jeet Singh, an assistant professor of religion at Trinity University in San Antonio and a senior religion fellow for the Sikh Coalition in New York, wrote on Twitter shortly after Bhalla’s victory. “I’m crying right now.”

Although Bhalla’s victory was widely celebrated as a sign of inclusiveness, it also brought out the opposite impulse in some detractors during the campaign, as evidenced by anonymously distributed fliers with Bhalla’s picture and the warning, “Don’t let TERRORISM take over our Town!”

Bhalla, in tweets and public statements, responded with the message, “We won’t let hate win.”

“It is not what Hoboken is about; it is not reflective of our community,” the New York Times quoted Bhalla in a Nov. 9 report.

Bhalla had made headlines in the same newspaper more than a decade ago, on Jan, 28, 2003, after he was denied entry to the Metropolitan Detention Center in Brooklyn, a federal facility, the previous September, to talk to a client.

Bhalla had refused demands by the jail’s guards to take off his turban, a symbol of Sikh faith, the New York Times reported. After Bhalla asserted his First, Fourth and Sixth Amendment rights in the U.S.District Court in Brooklyn, the Federal Bureau of Prisons issued a clarification of its search policy, proclaiming that religious articles of clothing such as turbans, prayer shawls and yarmulkes need not be part of prison guards’ routine searches of personal effects of visitors, according to the New York Times.

Late on Tuesday, Singh tweeted: “A Sikh brother was just elected mayor of a city in America. “This is a huge deal for our community.”

“We’ve been here for more than a century and have felt invisible and neglected,” Singh continued. “Things might finally be changing for us. Representation matters. Thank you, Ravi. Thank you, America.”