MEXICO CITY (AP) — A Mexican anti-corruption organization warned Monday that nepotism threatens the professionalism and independence of the nation's federal judiciary.

Mexicans Against Corruption and Impunity analyzed the familial ties among employees of Mexico's judicial system from judges and magistrates on down. It found that 51 percent of its judges and magistrates were related to at least one other person working in the judiciary. That rate varied widely by state and topped out in the western state of Jalisco where that was true for nearly 80 percent of the top judicial authorities.

Julio Rios Figueroa, a researcher with the Center for Economic Research and Training, who wrote the report, compared Mexico's rate of family relationships in the judiciary to 14 percent in Spain or 8 percent in the United States. He said it likely factored in the results of government polling last year that showed only 54 percent of Mexicans trust the country's judges and 71 percent believe corruption is frequent or very frequent among Mexico's judges and magistrates.

Rios points out that "it's not bad per se that relatives work within the same institution, if they have the required merits and the abilities."

The problem is that of 50 different types of positions within the judiciary, only two require a rigorous and competitive selection process. Much of the other hiring is largely discretionary possibly explaining how frequently judges' relatives are hired for administrative positions. He recommended more competitive and transparent hiring practices.

That has been hindered by a requirement that only allowed most positions in the judiciary to be filled by candidates already working for the judiciary, he said. Between 1995 and 2017, that was the case for 87 percent of the positions filled.

Most concerning are family networks within judicial circuits, because they create the possibility of selling justice to interested parties. Rios highlighted the 25th Circuit in the western state of Durango where 17 members of the same family were working.

"If you fight with one, you fight with all of them," said Pedro Salazar Ugarte, director of the Institute for Juridical Investigations at Mexico's National Autonomous University, in explaining the problem. "But if you win one of them over, you won them all over, because your case is going to be resolved at the Sunday family meal."