The D.C. teen accused of breaking into an 81-year-old woman’s house wearing a ski mask, punching the woman and taking her computer, said he regretted the attack after his capture, according to authorities.

“Y’all got me. That lady could have been my grandmother,” Tyran Mcelrath told detectives, according to police charging documents made available Friday afternoon. “I feel sorry for the lady.”

Police on Thursday charged Mcelrath, 18, of Southeast Washington, with burglary in the Wednesday afternoon break-in in the 3500 block of McKinley Street in Chevy Chase. In a hearing Friday in D.C. Superior Court, Magistrate Judge Karen A. Howze ordered Mcelrath held until a hearing scheduled for Nov. 19.

According to the charging documents, police were called to the woman’s home about 12:50 p.m. She told police that a masked man in her home — he got in through a basement window, authorities said — began punching her in the face and head, then cursed at her when she told him to leave. He fled on foot, police said.

At a Thursday afternoon news conference, police Cmdr. George Kucik called the attack heinous and said, “The person who did this is a coward.” At the time, police had little information about the attacker — at least in part, according to charging documents, because the woman is legally blind.

Within hours, however, police had found Mcelrath: According to the charging documents, he was being monitored by a GPS ankle bracelet that placed him at the woman’s home at the time of the attack. Officials familiar with the case said Mcelrath has a juvenile criminal record involving similar crimes and that he was a ward of the Department of Youth and Rehabilitative Services, but authorities have not discussed the matter publicly.

When police arrived at the McKinley Street home, according to charging documents, the woman told them she lost consciousness during the attack. When she woke up, she said, she found her laptop computer in her front yard and her front door open.

Milton Kotler, 77, said he was home when the burglar struck his next-door neighbor but did not hear the attack. A mailman found the woman as she tried to move a monitor into her house, he said.

“She had a big bruise on her face and a huge bump on her forehead,” Kotler said. “It’s unconscionable, what happened.”

Kotler said he helped the woman page through her address book to find her daughter, who lives in New York and quickly came to Washington to be at her bedside.

The woman was taken to a hospital for treatment. Reached by telephone Friday, the woman’s daughter said her mother’s condition was improving. She declined to discuss the incident in detail. A son, who lives in Coral Gables, Fla, also declined to comment.

Kotler said his neighbor, whose house is shrouded by bamboo that makes it “impossible” to see in from the street, rarely took visitors. She had worked for the Energy Department translating Russian science papers. Her daughter said she fled to the United States during World War II from Russia.

The Washington Post generally does not name crime victims.

Clarence Williams contributed to this report.