EL PASO, Texas — A high-powered rifle allegedly sold illegally by an El Paso FBI agent was used in a deadly Mexican drug cartel shootout last year, court records show.

According to a 2008 search warrant, agents from the Bureau of Alcohol, Tobacco, Firearms and Explosives linked a .50-caliber rifle sold by FBI agent John T. Shipley to a March 2008 shootout between drug cartel fighters and Mexican army soldiers. An army captain and six cartel members were killed in the nearly three-hour shootout in Chihuahua, agents said in the warrant.

Shipley was arrested last week on charges that he sold weapons via a Web site without a license. He's also accused of lying to the ATF about who the real buyers were.

According to the search warrant, filed in court in May 2008 and obtained by The Associated Press Tuesday, Shipley sold the .50-caliber rifle to Luis Armando Rodriguez, a former El Paso County deputy sheriff convicted last year of illegally selling guns, who then sold it to a buyer in Mexico.

Shipley's lawyer, Robert J. Perez, did return a phone call seeking comment. Court records do not show if Shipley has entered a plea in the case.

According to the 16-page search warrant in Shipley's case, an ATF gun trace tied him to the weapon used in the 2008 shootout.

In a 13-page search warrant filed last year in Rodriguez's case, agents said Rodriguez was a member of a motorcycle club in Ciudad Juarez, just across the Rio Grande from El Paso, who often sold weapons to "Mexican officials."

Agents said Shipley told them he sold the rifle, complete with a scope, to Rodriguez in 2007 for about $8,300. Shipley also said he had previously sold Rodriguez another .50-caliber rifle for $11,000 and a third gun for about $3,300, according to the search warrant.

Shipley was not a licensed gun dealer at the time, according to investigators.

Legal gun sales in Mexico are strictly regulated, with most weapons, including high-powered hand guns and rifles, limited to use by the military. But countless guns are believed to be smuggled into Mexico from the U.S. every day. High-powered weapons are routinely used by warring cartels fighting among themselves and against the government.

More than 11,000 people have been killed in Mexico's drug war since President Felipe Calderon launched a national offensive against drug cartels shortly after taking office in 2006.

As the killings have mounted authorities on both sides of the border have launched efforts to stem the flow of weapons south and trace weapons found in Mexico.