A homeless man in Texas has been charged with the rape of an 88-year-old woman, police said Thursday.

Justin Glenn Ellis, 21, was arrested on Wednesday for the June 11 attack, KHOU reported.

The rape took place at a senior housing complex, where the woman was a resident. She was in bed, watching television, when she was attacked, authorities said.

Ellis is believed to have gained access to the woman's apartment via an open bathroom window, police said. The woman fought Ellis, and he tried to smother her with a pillow, according to court documents reviewed by The Houston Chronicle.

Ellis is well-known to authorities in the area and has a long misdemeanor arrest record, Houston police officials said during a news conference. Most of those arrests were for criminal trespass, according to authorities.

Ellis faces up to life in prison if convicted of sexual assault of the elderly, KHOU reported.