By Alison Fox and Tamer El-Ghobashy

A 47-year-old patient in the psychiatric ward of a Brooklyn hospital was apparently beaten to death by another patient inside a shower room, police and hospital officials said on Wednesday.

Investigators were still trying to piece together what caused the violent episode at Interfaith Medical Center in Bedford-Stuyvesant and had taken a 20-year-old man into custody in connection with the beating, police said. According to a law enforcement official, the suspect made statements implicating himself in the beating but it was not clear what sparked the attack.

The suspect was being held at Kings County Hospital and expected to be charged in the murder on Wednesday, the official said. Neither man was identified by authorities.

Police said the incident unfolded before 8 p.m. on Tuesday on the eighth floor of the hospital. Officers responding to a 911 call found the victim unresponsive with injuries to his head and torso, police said. He was declared dead at the scene.