U.S. authorities say one of three men they arrested this week purchased an AK-47 at a Texas gun shop that was used in the attack last month that killed a U.S. federal agent and wounded his partner.

A gun used in a fatal attack on a U.S. Border Patrol agent in Mexico last month has been traced to a Texas man suspected of attempting to deliver at least 40 firearms to a Mexican drug cartel, federal authorities said Tuesday.

Thomas Crowley, spokesman for the federal Bureau of Alcohol, Tobacco, Firearms and Explosives in Dallas, said the weapon was one of three used in the Feb. 15 attack on Agent Jaime Zapata and his partner, Victor Avila, who survived.

FOR THE RECORD: Gun arrests: An article in the March 2 Section A about the connection between three Texas men and a weapon used in the fatal shooting of federal officer Jaime Zapata and the wounding of his partner, Victor Avila, incorrectly identified the officers as Border Patrol agents. Zapata was an Immigration and Customs Enforcement officer, as is Avila. —

The Romanian-made AK-47 was purchased at a Texas gun store in October by Otilio Osorio, 22, whom federal authorities began investigating in connection with suspected weapons purchases on behalf of Mexican drug lords a month after the rifle was bought.

The discovery marked the second time in recent months that a federal agent has been killed by a gun linked to suspected arms traffickers in the U.S.

Two assault weapons found at the scene of a December shootout near Nogales, Ariz., that killed U.S. Border Patrol Agent Brian Terry were found to have been purchased at a gun store in Glendale, Ariz., in January 2010.

The two cases point up the extent to which cross-border arms trafficking, long blamed for fueling the drug violence in Mexico, is a growing threat to the law enforcement agents charged with halting the flow of guns, drugs and immigrants across the U.S.-Mexican border.

On Tuesday, the U.S. attorney's office in Dallas released two criminal complaints charging Osorio and his brother, Ranferi, 27, with possessing firearms with obliterated serial numbers. The brothers were arrested Monday at their home in Lancaster, Texas, along with their neighbor, Kelvin Leon Morrison, 25, who was charged with knowingly making false statements in acquiring a firearm and dealing in firearms without a license.

According to court affidavits, the three men delivered 40 firearms with obliterated serial numbers to an ATF informant near the Mexican border in November. Drug Enforcement Administration agents sought help arranging the delivery in connection with their investigation of the notorious Zetas drug cartel.

The weapon allegedly used in the attack on Zapata and Avila was purchased by Otilio Osorio on Oct. 10, authorities said, but that only became clear when forensics technicians this week were able to read the filed-off serial number.

"We had been looking at these people as gun traffickers," Crowley said, but agents were continuing to quietly investigate them until the discovery of the gun link over the weekend. "We had to mobilize because of the seriousness of the event, and went and got arrest warrants."

On Sunday, Mexican officials announced the arrest in the northern city of Saltillo of Sergio Mora, a purported regional head of the Zetas cartel, in connection with the shooting of Zapata and Avila. At least four other men are in custody.