Updated at 3 p.m.: Revised to include details of the suspect's criminal record.

Dallas police have arrested a man in the fatal attack on two women in their North Dallas apartment earlier this month.

Jeremy Todd Meeks, 38, told police on Friday that he fatally stabbed one woman and injured her roommate. He made his confession while being questioned on a unrelated burglary warrant, police said.

Meeks is facing a capital murder charge as well as a burglary charge and is being held at the Dallas County jail. Bail has been set at $505,000.

Lin Wang, 24, was killed Sept. 21 after Meeks followed her into her home at Churchill on the Parks Apartments, 7601 Churchill Way, according to an arrest warrant affidavit.

Wang's roommate, who has not been identified, hid in the kitchen and was stabbed when she tried to flee to the bedroom during the attack, police records state.

Before going into the women's unit, Meeks entered a neighbor's apartment but left when the man spotted him, according to the affidavit. That neighbor heard screaming shortly after and called 911.

Wang's cellphone was stolen in the attack. Police traced it and determined that it had been near the site of a burglary about 11:45 that night.

While investigating the burglary of the Alexis Hotel in the 7800 block of LBJ Freeway, police reviewed security video in which Meeks was seen wearing the same distinctive red and black shirt that both Wang's roommate and neighbor had described to police, the affidavit states.

The hotel is less than a mile from Wang's apartment.

Meeks has an extensive criminal record. He was sentenced to eight months in prison after pleading guilty to a theft charge in Dallas County in June 2016, and he was convicted on burglary charges and a misdemeanor assault charge in Collin County in 2008.

He has also served prison sentences at the Texas Department of Corrections for several convictions dating to 2001, including theft, assault (strangulation), criminal mischief, evading arrest and burglary.

A photo of Lin Wang from her Facebook profile. Wang had just graduated from UT Dallas in August with a master's degree in accounting when she was killed Friday in her apartment at Churchill on the Park apartments. (Facebook)

After Meeks' arrest this month in the burglary case, he told detectives during questioning that he had stabbed two women and described the knife used in the attack, according to police records.

Police said Wang was walking her pet just before 8 p.m. Sept. 21 when Meeks followed her into into her apartment and stabbed her and her 24-year-old roommate.

Social media profiles for Wang show that the 24-year-old, who went by Renee, had recently graduated from the University of Texas at Dallas after getting her bachelor's degree from Shandong University of Finance and Economics in China.