Two years ago, Fernanda De Felice was at the top of her game. The biochemist at the Federal University of Rio de Janeiro (UFRJ) in Rio de Janeiro, Brazil, was developing a nonhuman primate model for Alzheimer’s disease and publishing in top journals. But since then, a state budget crisis has cut off all public funding for her work. In March, De Felice will decamp to Canada for a 2-year stint at Queen’s University in Kingston, leaving her husband and main collaborator, UFRJ professor Sergio Ferreira, to shuttle between Rio and Kingston. “It’s not what I wanted, but it’s what I had to do,” De Felice says. “Staying in Brazil would mean the end of my career.”

Thousands of other scientists in the state of Rio de Janeiro, which includes Rio, Brazil’s second biggest city, and many key research institutions, face a similar struggle. Declining federal support for science in cash-strapped Brazil had sapped funds for scholarships and lab infrastructure. Now, Rio de Janeiro’s funding agency, FAPERJ, is bankrupt. It has fallen $150 million behind on grant payments—and over 2 years has cut off funds to 3670 research projects. Last year, it devoted most of its spending—$30 million—to graduate scholarships. Science funding faces similar threats in other Brazilian states.

A massive brain drain is a real risk, scientists warn. “I know a lot of people who want to leave,” says Stevens Rehen, a stem cell researcher at UFRJ and the D’Or Institute for Research and Education. Compounding the poverty, he says, is a despair that permeates the scientific community. “This is affecting an entire generation of scientists.” Rehen has kept his lab running on cash accumulated before 2015, and his team has published several papers in recent months. However, he says, “We’ve burned all the fat that we had left.” FAPERJ owes him more than $475,000, and last year he lost three postdocs: one to Poland, one to the United States, and another to the private sector.

The federal government still pays salaries at UFRJ, but at state universities, employees—including some 3000 researchers–just received their November 2016 salaries. Professor resignations are on the rise at Rio de Janeiro State University in Rio, which FAPERJ owes $20 million in research funds, says Vice Chancellor Egberto Moura. “We never thought it would go this far,” adds Carlos Rezende, a senior environmental scientist at the State University of Northern Rio de Janeiro in Campos dos Goytacazes. Phone services were disconnected on campus most of last year, he says, because of unpaid bills. “I have invitations to move to other institutions. If this situation persists, I might not have another choice,” Rezende says. “I am 56 years old. I can’t live with this level of uncertainty anymore.”

There is little FAPERJ can do but watch the trainwreck unfold. The agency by law had been entitled to 2% of state tax revenues until last month, when Rio de Janeiro Governor Luiz Fernando de Souza signed a decree slashing FAPERJ’s revenue allotment by 30%, to 1.36% of projected revenues. But over the past couple years, the government has awarded the agency far less—about 40% of the planned budget in 2015 and 2016. The agency continued to issue calls for proposals and award grants that it now can’t fund. “We hope this will be a temporary situation,” explains FAPERJ Scientific Director Jerson Silva in Rio.

Red flags are also up in neighboring São Paulo state, where the legislature last month for the first time signaled it won’t fulfill the lawful budget allotment of its state science agency, FAPESP. Entitled to 1% of state tax revenues, FAPESP will get 0.89% of projected revenues in 2017—a reduction of $35 million. FAPESP is attempting to negotiate a reprieve.

The plight of Brazilian scientists “is exactly as bad as it sounds,” says Suzana Herculano-Houzel, a neuroscientist who left UFRJ for Vanderbilt University in Nashville last May, and urged others to follow. Some colleagues, she says, resented her doomsday attitude and labeled her a deserter. But she stands by her exhortation: “We have to be honest, and tell people they should leave if they can.”