Police are searching for a career criminal who posed as a repairman to get into an elderly Bronx woman’s apartment before savagely beating her and trying to rape her, law enforcement sources said.

Gary Mallette, 51 — who police sources said has been arrested more than 80 times since 1983 — showed up at the 83-year-old’s Castle Hill Houses apartment shortly before 1 p.m. Saturday.

The octogenarian, who was alone at the time, opened the door assuming Mallette was a maintenance worker she had been expecting, police said.

Mallette, who cops say lives in the same building, allegedly shoved the elderly woman into her bedroom, ripped her clothes off and tried to rape her, law enforcement sources said.

Officials said he beat her so badly, she had to be treated for broken bones and facial injuries.

“He broke all the ribs on one side of that woman’s body and half on the other side,” the source said.

The victim’s family came home mid-attack, scaring off Mallette, who fled the apartment with his face covered, sources said. He made off with jewelry and the woman’s cellphone, police noted.

The woman was rushed to a nearby hospital, officials said.

Mallette lives in the building with his mother, who positively identified him as the suspect to authorities, the source said.

He has done multiple stints in prison for grand larceny, criminal sale of a controlled substance, robbery and attempted robbery, according to state Department of Corrections records.