A United Nations official said torture of detainees is widespread in Mexico and that the practice is carried out by members of the military and all levels of civilian law enforcement.

A "generalized situation" of torture and mistreatment persists in Mexico, the U.N.'s special rapporteur on torture, Juan Mendez, said in a press conference at the end of a visit that began on April 21 and concluded on Friday.

The abuse occurs most frequently between the time of arrest and the suspect's initial appearance in court, according to Mendez, who expressed concern about the "continued militarization" in some regions.

Mendez, however, qualified his remarks about torture being generalized, saying that it should not be implied from his findings that torture is "systematic" or promoted by high-ranking government officials.

Complaints about torture have been filed in "practically all the police forces that make arrests in this country," he said.

Asked about his impressions after his visit, Mendez said he would like to say "that torture is isolated in Mexico" and that the cases are "aberrations that can be quickly corrected."

The U.N. rapporteur, who described torture as "endemic" in the country, met with federal and state authorities and visited jails and other corrections facilities during his stay.

In its World Report 2014, New York-based Human Rights Watch said "torture is widely practiced in Mexico to obtain forced confessions and extract information."

The rights watchdog said Mexican "justice officials rarely apply the Istanbul Protocol, a set of principles to assess a potential victim of torture or ill-treatment."

It said federal prosecutors "only opened 39 investigations for torture" from 2003 to 2013, "none of which led to convictions."

In that same report, HRW said that in recent years "Mexico has relied heavily on the military to fight drug-related violence and organized crime, leading to widespread human rights violations." EFE