Jordan Kelsey-Stewart, 25, bought the weapon from Dale's Guns in Powhatan, Va., chief NYPD police spokesman Paul Browne said. Officials with Bureau of Alcohol, Tobacco, Firearms and Explosives are trying to find her and are investigating whether she had any connection with Martinez; a telephone listing for her could not immediately be found on Friday.
Police said Kelsey-Stewart reported the gun stolen from her car Oct. 28 in Richmond, Va. It was unclear how Martinez obtained it, and there was some evidence he owned it for only a brief period of time - weeks at most and perhaps just days.
Investigators also were trying to determine whether Martinez had other weapons. They said they found a .22-caliber handgun during a police search of Martinez's home on Friday.
"We're actively investigating whether he was involved in purchasing firearms," Browne said.
Dale Blankenship, who owns Dale's Guns, said he provided the information about who bought the gun to the ATF earlier Friday. He said Kelsey-Stewart was from the Richmond area, had all the proper identification and passed a background check when she purchased the weapon.
Blankenship said she bought the gun by herself. He didn't know what happened to the gun after he sold it.
"I have no idea," he told The Associated Press. "I really don't know what happened. I don't know how the gun was stolen."
Martinez, 25, went by the rap name "Ready" and regularly sold CDs for his group, Square Free, in Times Square. He was part of a freelance collection of hawkers who sell self-produced wares on the street.
Police said Martinez ran a scam in which he would autograph a CD or put a passerby's name on it, and then demand payment of $10. He had been arrested June 19 at 1515 Broadway, the exact same location where Thursday's confrontation started, for not having a tax stamp, which allows hawkers to sell their self-produced wares.
Vendors selling their own work are protected by the First Amendment and fall outside the stricter regulation of vendors selling retail goods.
The sheer number of vendors in Times Square and their aggressiveness lead to frequent confrontations with authorities trying to catch counterfeiters and protect tourists from scams.
Martinez and his brother are well known to regular Times Square denizens and videos of them rapping and getting hassled by police are posted on YouTube. In one shaky video, Martinez shouts, "They ain't taking me nowhere!" and "I'm ready to lay some down!" as officers, their hands in their pockets, escort him from the area. His lyrics talk of hawking CDs and staring down cops.
Sgt. Christopher Newsom usually works in uniform on a task force that tracks aggressive peddling. He was in plainclothes when he stopped Martinez on Thursday and asked him for his tax stamp, setting off the chase and shootout.
Josiah Deandrea, who was distributing fliers Friday to a comedy act a block from the shooting scene, said he had seen Martinez in the area in the past.
"Nobody had any idea he had a gun," Deandrea said.
Daniel O'Phalen, 24, who passes out fliers in Times Square for the musical "White Christmas," said Martinez was part of a regular crew of CD salesmen. Sometimes, he said, the group would order him off a corner, saying he was on their territory.
"They're pushy. They're not nice guys," he said.
Still, it's rare that police encounters with peddlers escalate to gunfire.
"These are usually quality-of-life violations, and they typically do not escalate, they don't involve violators being armed," Browne said.
If Martinez had recently gone looking for a gun, it wouldn't have been unusual for him to look out of state.
Because buying a firearm is so difficult in New York, people barred from owning pistols here often travel south to shop at gun shows where there are no required background checks for people buying secondhand weapons. Martinez didn't have a license to own a firearm.
There is also a steady supply of guns purchased at southern gun shops and smuggled north.
Mayor Michael Bloomberg has been a fierce critic of gun stores with a record of selling weapons that later wound up in the hands of criminals, suing several of them in recent years for reckless conduct and driving several out of business.
There are "too many guns on the streets," the mayor said Friday. "This is one of the great public health threats. And our police officers are clearly in danger."
The machine pistol like the type used Thursday are rare in the city: only 26 have been recovered so far this year, compared with 5,427 other guns. In 2008, there were 46 recovered, and 5,959 other guns.
Associated Press writers Cristian Salazar, David B. Caruso, Adam Goldman, Ula Ilnytzky and Sara Kugler in New York and Dena Potter in Richmond, Va., contributed to this report.