Ecuador has named its sixth prisons chief in less than two years after a month of intense violence in the country’s penal system.

Luis Ordonez, a retired soldier and intelligence expert, is replacing Guillermo Rodriguez, who resigned last week after an admission that he failed to improve SNAI, the nation's prisons authority.

Ecuadorian President Guillermo Lasso, who took office on May 24, 2021, approved the appointment on Tuesday.

The United Nations Human Rights Office last year raised concerns about "the dire situation in various detention centers and prisons in Ecuador."

ECUADOR PRESIDENTIAL CANDIDATE FERNANDO VILLAVICENCIO ASSASSINATED AT CAMPAIGN EVENT: REPORT

"The recent violence is the consequence of decades of state abandonment," said Maria Luisa Romero, who led a U.N. delegation to visit the country

Ecuador prison

Security forces stand guard inside the Bellavista prison in Santo Domingo, Ecuador, on May 10, 2022, a day after a deadly riot. (Rodrigo Buendia/AFP via Getty Images)

"Detainees have been living in a state of tension and constant fear in prisons lacking essential services and basic resources," she added. "Some spaces in these prisons are self-governed by detainees who are members of criminal organizations."

The country’s homicide rate has quadrupled since 2018, when the rate stood at 5.8 per 100,000 inhabitants, the BBC reported. Citizens went from saying they felt safe to lacking any confidence in the police to keep them secure.

COLOMBIA'S MOST WANTED DRUG KINGPIN FACES SENTENCING IN US

The skyrocketing crime, according to the BBC, is blamed on an increasingly fractured control over cocaine production in neighboring Colombia and Peru, which are the largest producers of the drug in the world.

UN secretary-general meets with Ecuador's president

Ecuadorian President Guillermo Lasso, left, meets with U.N. Secretary-General Antonio Guterres at U.N. Headquarters in New York City. (Lev Radin/Pacific Press/LightRocket via Getty Images)

The significant reduction of Revolutionary Armed Force of Colombia (FARC) after a peace accord signed in 2017 led to new players emerging on the market to try and stake a claim on the lucrative trade, including foreign players from the Mexican drug cartels and even criminal groups in the Balkans.

Gangs seized on lax border control between the neighboring countries and Ecuador, which has major port access to the Pacific coast and good infrastructure. They empowered local gangs and created alliances throughout the country to take advantage of a security force lacking experience fighting cartels.

PRESIDENT LULA'S FORMER LAWYER TAKES SEAT ON BRAZILIAN SUPREME COURT

The ensuing surge in criminal activity reached deep into the prison system, where inmates regularly get into fights on behalf of their benefactors, often resulting in dozens of deaths each time.

aerial view of Ecuador prison

This is an aerial view of the Guayas 1 prison after clashes between inmates in Guayaquil, Ecuador, on July 23, 2023. (STR/AFP via Getty Images)

At least 12 inmates died in an April prison riot between gangs in La Penitenciaria in the city of Guayaquil. 

CLICK HERE TO GET THE FOX NEWS APP 

A riot last month left 31 dead and 14 wounded as more than 2,700 soldiers stormed the prison to retake control of the facility, CBS News reported. By that time, at least 420 people had died in the riots since 2021, some of them decapitated or burned alive.

Reuters contributed to this report.