MEXICO CITY (AP) _ Police have arrested a narcotics trafficker after an 11-month search for the mastermind of the massacre of 18 anti-drug police agents last year, the Attorney General's Office said Friday.

The suspect, Abelardo Sanchez Alcaraz, was arrested Wednesday in Michoacan state, west of Mexico City, where he had spent months in hiding, government spokesman Felipe Flores said.

Sanchez Alcaraz, in his mid 20s, was presented at a news conference, escorted by federal agents, and he said he had been involved in marijuana smuggling.

But he denied any connection with other drug traffickers, including Rafael Caro Quintero who has been charged in the February 1985 kidnap-killings in Guadalajara of U.S. Drug Enforcement Administration agent Enrique Camarena Salazar and his Mexican pilot.

Sanchez Alcaraz's voice was barely audible, and it could not be determined if he was admitting guilt to the government charges.

The 18 anti-drug agents were killed Nov. 2 in the worst massacre of policemen in Mexico's history. They were slain after they discovered several tons of marijuana ready for shipment in a settlement in the mountainous area of southern Veracruz state.

Officials said the agents were attacked by drug traffickers armed with rifles, and when the police ran out of ammunition and were captured they were tortured, forced to kneel and shot. Two civilians also were slain in the massacre.

The Attorney General's Office issued a statement saying nine other people have been arrested in connection with the killings and they implicated Sanchez Alcaraz as the ''intellectual author of the collective massacre of the public servants.''

It said Sanchez Alcaraz admitted that he killed four of the agents and later fired coup de grace shots into ''several bodies.''

The statement said Sanchez Alcaraz had been trafficking in marijuana for six years.

After the massacre, he spent time in hiding in the city of Puebla and in the state of Mexico outside Mexico City before going to Michoacan to stay with relatives, according to the statement.

Flores said police are still looking for five other people in connection with the massacre.

Officials say drug bosses virtually control the isolated mountain area where the agents were slain, employing thousands of peasant farmers in the cultivation of marijuana and opium poppies.