A District of Columbia teenager was sentenced to seven years in prison for beating an 81-year-old woman during a break-in of her Chevy Chase home in Northwest Washington.

Eighteen-year-old Tyran McElrath, of Southeast D.C., pleaded guilty in D.C. Superior Court to one count of first-degree burglary and one count of aggravated assault.

McElrath expressed regret after his capture for the November attack.

"Y'all got me. That lady could have been my grandmother," McElrath told detectives, according to charging documents. "I feel sorry for the lady."

According to charging documents, McElrath left his home on the morning of Nov. 7 and traveled to the 3500 block of McKinley Street NW with the intention of burglarizing the woman's residence.

McElrath, who did not know his victim, put a ski mask over his head and broke into the home through a basement window. The woman was on the second floor of the house, listening to music.

McElrath grabbed some tools from the basement and climbed the stairs to the main floor of the house, where he rifled through cabinets and the woman's purse.

He carried an Apple computer outside and hid it in the bushes at the base of the front porch steps, and went back inside.

That's when the victim came downstairs to put her shoes on and discovered the stranger in her foyer.

The woman walked to the front door and politely asked McElrath to leave. Instead, police said, McElrath punched the woman repeatedly in the face with his fist until she lost consciousness.

A postal worker came upon the victim sometime after the assault. She was disoriented and suffering from multiple bruises and broken teeth.

The victim was taken to a hospital, where she stayed for several days with severe facial contusions and head injuries. She was traumatized by the attack, and no longer able to live alone in the home.

Her overall health deteriorated in the ensuing months, and she recently died.

Police were able to identify McElrath because he was being monitored by a GPS ankle bracelet that placed him at the house at the time of the attack. When he was arrested, officers said McElrath had a ski mask on his head that matched the assailant's.

Police subsequently obtained surveillance video from Metro that showed McElrath as he traveled to and from the crime scene.