BERKELEY -- The Alameda County coroner is investigating after a 41-year-old man died while being taken into police custody for an involuntary psychiatric hold Tuesday night, officials said Wednesday.

Police said they responded to a call just before midnight about a person who may have been having mental health issues at an apartment building in the 2100 block of Allston Way.

When police attempted to talk to the man, he became "agitated and uncooperative to the officer's verbal commands and began to scream and violently resist," according to a statement from Berkeley police.

A struggle ensued, police said, and they were able to place the man in restraints, but he continued to kick and scream. After being loaded onto an ambulance gurney, police said they noticed he was not breathing, and they began CPR. He was taken to a hospital and pronounced dead, police said.

Police did not identify the man, and Sgt. Patricia Wilson of the coroner's office said the Berkeley Police Department has a hold on the case.

Police said the death will be investigated internally and they will notify the Alameda County District Attorney's Office.

Wilson said investigations into deaths that occur in police custody are handled like any other "unnatural" death and do not include special protocols.

Speaking in general about coroner's investigations, she said the department can perform autopsies, interview witnesses, take photographs, review police reports and review the person's previous medical records.

Wilson said some reports can take up to a year to complete.

Doug Oakley covers Berkeley. Contact him at 510-843-1408. Follow him at Twitter.com/douglasoakley.