An African-American man from New Jersey claims he was falsely accused of theft and arrested when he tried to exchange his broken iPad at an Apple Store in Berkeley, Calif.

In a suit filed in federal court in Newark, Terrell Gray says the store’s action was part of a pattern and practice of racial profiling of nonwhite customers. The city of Berkeley and its police department are also named as defendants.

Gray says that when he arrived at the store on Dec. 30, 2012, personnel told him Apple would not exchange his iPad for a new one but would replace the cracked screen at no cost. He says he was then approached by two police officers who handcuffed him and placed him under arrest.

When questioned, he asserted his right to remain silent. Police took Gray to John George Psychiatric Hospital in nearby San Leandro, where he spent the night, the complaint says.

The next morning, after release from the hospital, he returned to the Apple Store. After attempting to state his case with store employees, he was arrested on suspicion of theft. He was held without bail for roughly a week but never formally charged, according to his attorney, South Orange solo Karimu Hill-Harvey.

On Jan. 6, 2013, police took Gray to Alameda County Medical Center and then to John George Psychiatric Hospital, where he remained for about 45 days. He then returned to New Jersey and, upon consulting with a doctor, was committed to Trenton Psychiatric Hospital, for about three months.

Hill-Harvey says she viewed videotapes from her client’s visits to the Apple Store and saw no evidence suggesting he failed to conduct himself properly. The videos indicated white shoppers in the Apple store were served without incident, while Gray, dressed in army fatigues and wearing his hair styled in twists, was given disparate treatment.

“Apple engaged in a pattern and practice of racially profiling its African-American/Black and other non-White shoppers as suspected criminals,” the suit says. “Specifically, store security personnel commonly and disproportionately target and follow people of color for suspicion of shoplifting, credit card fraud, and other acts of larceny/theft, and disproportionately subject those shoppers to false accusations of unlawful activity, wrongful detentions, unjustified body and property searches, false imprisonment, wrongful confiscation of property and other harassment on the basis of their race, national origin, ethnicity and/or color.”

However, a black woman friend of the plaintiff was later able to exchange his iPad for a new one at the Berkeley store without incident, the suit says.

Gray alleges that as a result of his treatment by Apple employees and Berkeley police, he suffered “mental anguish, emotional pain and suffering, humiliation, embarrassment, physical and emotional distress, feelings of paranoia and distrust, depression, low self-esteem, sleep deprivation, loss of enjoyment of life, interference with life’s daily activities and a deprivation of his civil rights.

The complaint lists counts of violations of 42 U.S.C. §§ 1981, 1982 and 1985 for treating the plaintiff differently based on race. Counts against the city and police department include false imprisonment, assault and battery, negligent hiring and training, negligent infliction of emotional distress and violation of the California Human Rights Law.

The suit is filed in the District of New Jersey based on diversity jurisdiction.

Apple’s corporate offices were closed on Tuesday and no one could be reached for comment. A spokeswoman for the Berkeley Police Department, Officer Jennifer Coats, and a spokesman for the city of Berkeley, Matthai Chakko, declined to comment.