A man in police custody died Thursday in Northern California after he broke a hospital's window with a metal oxygen tank and fell off a ledge following an altercation with an officer and a nurse, authorities said.

The man was in custody because he had allegedly violated a court order, according to San Jose police. Officers took him to the hospital for an unspecified pre-existing medical condition.

GEORGIA PRISON GUARD, JAIL NURSE CHARGED WITH GIVING INMATES CONTRABAND

The man is accused of assaulting an officer and threatening to hit the officer and a nurse with the oxygen tank, police said. They left from the room and called for more help.

CA Fox News graphic

A California man in police custody reportedly died after falling from a ledge he climbed onto after breaking through a hospital window with his oxygen tank. (Fox News)

The man broke the window with the oxygen tank while he was alone in the hospital room and jumped out onto a ledge, the police department said. The officer and two hospital security guards went back into the room to stop the man's escape attempt, but he fell 20 feet from the ledge.

CALIFORNIA PRISONER DIES IN CUSTODY AFTER DRINKING TOO MUCH WATER

The man sustained life-threatening injuries and was pronounced dead at a different hospital. His death in police custody is under investigation.

CLICK HERE TO GET THE FOX NEWS APP

San Jose is about 20 miles southeast of downtown San Francisco.