A homeless man accused of hitting a 6-year-old girl on a NICE bus on Christmas Day in Elmont was ordered held on $50,000 bond or bail at his arraignment Monday morning, authorities said.

Michael Oxios, 62, who police said was homeless, was arraigned on charges of endangering the welfare of a child, third-degree attempted robbery and resisting arrest before Judge Joseph Girardi in First District Court in Hempstead, according to a spokeswoman for the Nassau district attorney’s office.

Oxios was represented by a Legal Aid Society attorney and is due back in court Thursday, the spokeswoman said.

The child, who was not identified, was riding the bus with her mother on Christmas afternoon when Oxios, “for no legitimate reason,” repeatedly struck the girl in the back of the head, according to court papers.

Oxios began screaming obscenities and then struck the girl again and pulled her hair, the court papers said.

“The defendant’s actions were harmful and detrimental to the physical and moral welfare of the 6-year-old victim,” the court papers said.

advertisement | advertise on newsday

The girl’s mother called authorities, police said.

Oxios “pulled away” from Nassau Police Officer Matthew McCready as he was trying to arrest him, grabbed the cop’s stun gun and tried to “forcibly remove” it from its holster, the court papers said.

McCready, with the help of another officer, was able to eventually handcuff Oxios, the court papers said. He was arrested about 3:15 p.m., police said.