The mother of a 6-year-old Harlem boy, who died after being brought to the hospital with bruises and a head injury, was arraigned Wednesday, along with her boyfriend.

Geraldine Perkins, 26, and her boyfriend, Rysheim Smith, 42, were charged with endangering the welfare of a child, police said. Bail was set at $50,000 for each, a source said.

Perkins told cops that Smith had punched and beaten her son, Zymere Perkins, with a broom after he defecated in the living room Monday, the criminal complaint says. Perkins said Smith continued to strike the boy even after he went limp and then hung the boy by his shirt on the bathroom door, the complaint says.

The mother said Smith left the apartment, and she removed her son from the door and placed him on the bed unconscious. She then went to rest and “read the Bible,” the complaint says. When she checked on her son later, he did not wake up, according to the complaint.

She then took him to Mount Sinai St. Luke’s Hospital, where he was pronounced dead.

Perkins told investigators that Smith had repeatedly beat her son before this incident, according to the criminal complaint. She and Zymere had moved into Smith’s apartment on West 135th Street in Harlem, which has no electricity and is infested with cockroaches, in June, according to the complaint.

Smith, however, is claiming Perkins was the one to hurt the boy and said he had left the apartment Monday to go to the Fortune Society, an organization that helps ex-cons, a police source said. Smith, who has 13 prior arrests, said that when he got back, he saw Perkins doing CPR on her son, according to the source.

Smith’s prior arrests include charges for marijuana and controlled substances, the source said.

Perkins has also had a history of child abuse allegations, the source said. It wasn’t immediately clear how many times authorities were called to her house.

Perkins and Smith will appear in court again on Oct. 3. The investigation is ongoing.

With Alison Fox