A recently fired hospital janitor savagely attacked his ex-boss, hitting her over the head with a baseball bat in Staten Island Sunday, cops said.

The 55-year-old man confronted his 58-year-old former supervisor on the second floor of Staten Island University North around 5 p.m., after being fired several days ago, officials said.

The victim was brought downstairs to the Emergency Room in serious condition with a possible skull fracture, but is expected to survive.

Authorities recovered the bat and a knife at the scene.

The volatile custodian was arrested and will undergo a psychiatric evaluation, police said.

A hospital representative confirmed that one of their employees was attacked on the premises but could not provide more information.