HAYWARD (CBS SF) — A man died during an arrest by Hayward police early Saturday morning, police said Tuesday.

The man suffered a medical emergency after being restrained while police tried to take him in custody on a psychiatric hold, police said.

READ MORE: 3 More Gray Whales Found Dead In San Francisco Bay

Police responded to the 25000 block of Ironwood Court at 1:08 a.m.  on reports of a man requiring an emergency mental health evaluation.

But when they put him in the back of a patrol car while waiting for an ambulance he became violent and tried to kick out the back windows of the car, according to police.

READ MORE: Shooting Reported Along Highway 4 In Pittsburg; 3rd Shooting In A Week

The officers took him out of the car and restrained his legs.  Shortly after that he suffered a medical emergency and was taken to a hospital but died.

He was identified as 42-year-old Roy Nelson of Hayward. The cause of his death is under investigation by the Alameda County coroner’s bureau.

MORE NEWS: San Jose Police Officer Hit By Vehicle

© Copyright 2015 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.