(Reuters) - The former attorney general of Mexico’s Pacific coast state of Nayarit, hit hard by drug cartel violence in recent years, was sentenced on Thursday to 20 years in U.S. federal prison for his role in a major Mexican-U.S. narcotics trafficking ring.

A pile of marijuana is being incinerated at the 28th Infantry Batallion in Tijuana, Mexico September 26, 2019. REUTERS/Jorge Duenes

Edgar Veytia, who was Nayarit’s top law enforcement official from 2013 until his arrest in San Diego in 2017, was sentenced by a federal judge in the Brooklyn borough of New York City.

He pleaded guilty in January to a single count of conspiracy to manufacture and distribute heroin, cocaine, methamphetamine and marijuana.

In his plea agreement with the government, Veytia, 48, admitted to conspiring with a drug cartel operating in his home state to smuggle thousands of kilograms of narcotics from Mexico into the United States for distribution in the New York area.

The cartel, implicated in dozens of homicides and tortures, also had distribution cells in Los Angeles, Las Vegas, Ohio, Minnesota and North Carolina, the U.S. Justice Department said in a statement announcing the sentencing.

The department identified the drug ring in question as a cartel previously led by Juan Francisco Patron Sanchez, alias H-2, who was killed in a clash with Mexican marines firing on him from a Black Hawk helicopter in February 2017.

That group, also known as the Beltran Leyva Organization, split from and went to war in 2008 against the Sinaloa cartel, formerly run by the notorious Mexican drug lord Joaquin “El Chapo” Guzman, sent to U.S. prison for a life term in July.

Veytia was accused of abusing his position as Nayarit’s attorney general to assist H-2 cartel traffickers, providing them official sanction to operate with impunity in his region.

In return for monthly bribes, Veytia directed corrupt Mexican law enforcement officers under his supervision to aid and abet the cartel and target rival traffickers with wiretaps and arrests, while assisting the H-2 cartel with murders and other acts of violence, the Justice Department said.

Veytia also had arranged for H-2 cartel members and associates arrested for drug trafficking offenses to be released from custody, it added.

An armed group attacked Veytia in 2011, but he escaped injury in the ensuing shootout.

A dual citizen of the United States and Mexico, Veytia was arrested in March 2017 after a federal grand jury indictment in the Brooklyn borough of New York City.