BOGOTA, Colombia (AP) — Colombian President Juan Manuel Santos on Thursday granted 440,000 refugees from crisis-stricken Venezuela two years of help, while urging leaders in the neighboring country to stem the spreading humanitarian crisis.

Santos, who leaves office Tuesday, gave the refugees temporary residency permits, allowing them to study, work and get medical care that many need after arriving with untreated ailments.

“The whole world is increasingly terrified of what is happening in Venezuela,” Santos said, speaking from the presidential palace.

Tensions are high between Colombia and Venezuela, a once-wealthy oil nation in the grips of a five-year crisis under President Nicolas Maduro’s socialist government. Venezuelans struggle to afford scarce food and medicine under soaring inflation — driving masses across borders.

Santos condemned Maduro for the crisis, saying it burdens neighboring countries like Colombia. He said more than 1 million Venezuelans have fled into Colombia in the last 18 months.

Santos urged Maduro to allow international humanitarian relief for easing suffering in Venezuela and slowing the flow of migrants.

Maduro has refused international help, either denying a crisis in Venezuela exists or saying it would allow in imperialist invaders from the United States and its allies, such as Colombia.

While critical of Maduro, Santos said his country is willing to help those suffering.

“They are Colombians returning to the country,” Santos said. “They are Venezuelans. They are Colombian-Venezuelan families, and they’re returning in precarious conditions.”

Meanwhile, self-exiled Venezuelan judges in Bogota opened a largely symbolic trial against Maduro, despite his absence.

Former Venezuelan chief prosecutor Luisa Ortega, who is leading the case, accused Maduro of taking $35 million from the Brazilian construction firm Odebrecht for his 2013 presidential campaign. Ortega alleged that in exchange, Maduro offered the company infrastructure projects worth more than $2.5 billion.

The 32 judges hearing the case were appointed to Venezuela’s highest court last year by the opposition-controlled National Assembly, but were forced to flee after the government refused to acknowledge their appointments and accused them of illegally trying to replace Venezuela’s Supreme Court.

Maduro has denied the corruption charges and doesn’t recognize the court-in-exile.

Despite his absence, the court assigned Maduro a public defender, who argued the accusations are not supported.

Ortega defended the action.

“We have to continue taking actions that will lead to Maduro’s exit,” Ortega told journalists outside the trial. “The Venezuelan people have already suffered enough.”