Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

More than eight months after the White House first asked for it, Congress has finally agreed on some funding to help fight the Zika virus and study its effects.

President Barack Obama signed stopgap spending bill Thursday. It provides $1.1 billion to use in continuing work on a vaccine against Zika virus infection, as well as studies of the effects on unborn babies, adults and children. It will also help states control the mosquitoes that spread the virus.

“Congress has finally treated Zika like the emergency it is and shown the American people that it is capable of rising above partisanship for the health of its citizens,” said Dr. Thomas Gellhaus, president of the American Congress of Obstetricians and Gynecologists.

A special MRI at Children's National Health System can image a developing fetus and help doctors better track any damage caused by Zika virus. Children's National Health System

It's just over half what federal health agencies say they need, and the approval squeaked through just two days before the end of the fiscal year on Sept. 30.

“We’ll be able to put that money towards the Zika fight as soon as the new fiscal year begins,” said Health and Human Services Department spokesman Kevin Griffis.

The National Institutes of Health and the Centers for Disease Control and Prevention said they had run out of fresh money to fight Zika. The administration had already pulled $589 million from other programs, including $500 million meant to help prevent another Ebola outbreak. The CDC and NIH had robbed emergency preparedness, cancer, vaccine and HIV programs for more cash.

This bill does not give back any of the borrowed money, said National Institute of Allergy and Infectious Diseases director Dr. Tony Fauci.

That includes $11 million from tuberculosis, malaria, flu; $47 million from reprogrammed Ebola funds and $34 million from the National Cancer Institute and other NIH institutes. "We may never get to officially pay that back," Fauci told NBC News.

"All the $152 million that (NIAID) will receive will go to Zika projects, predominantly the vaccine work."

Related: White House Shifts Ebola Funds to Zika Fight

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

“It's disgraceful that Congress took so long responding to this deadly health crisis,” said Florida Rep. Vern Buchanan, a Republican who fought for Zika funding. “This was a case of Washington dysfunction at its worst.”

HHS Secretary Sylvia Burwell said she did not know what other funds she could plunder.

Related: Zika Virus Search Finds Another Virus: Dengue

Republicans and Democrats in Congress sparred for months over where the Zika money should come from and whether any spending bill should limit how it’s spent. Republicans wanted to repurpose existing funds and keep them away from Planned Parenthood clinics in Puerto Rico; Democrats wanted what they called a “clean” bill without such restrictions.

“While we are satisfied this was the best compromise Congress could achieve at this time, the funding has been direly needed for months and is still less than the President’s request."

Senior health officials like Fauci and CDC Director Dr. Tom Frieden and were forced to beg, repeatedly, for funds both on and off Capitol Hill.

While Congress argued, Zika arrived in the U.S. The CDC reports thousands of confirmed Zika cases in U.S. travelers, including more than 800 pregnant women. CDC experts say there are likely thousands more that haven’t been reported.

Florida reports 134 home-grown cases – presumably caused by travelers infected in other Zika zones who were then bitten by local mosquitoes. Southern states, including Florida, are home to the Aedes aegypti mosquito that spreads Zika.

In the end, the legislation directs $394 million for mosquito control and $397 million for work on vaccines and better tests to diagnose Zika infections in people.

It also provides $66 million to help people infected with Zika in U.S. territories – mostly Puerto Rico, which has a full-blown Zika epidemic.

#Zika funding from Congress will help our #publichealth experts continue vital work to protect the American people from this virus. — Sylvia Burwell (@SecBurwell) September 29, 2016

“We are disappointed that the package fails to replenish resources redirected from other public health needs, including from funds allocated to ongoing impacts of the 2014 West Africa Ebola outbreak,” the Infectious Diseases Society of America (IDSA) said in a statement.

“The infectious disease outbreaks of the last two years alone have underscored the importance of prepared and well equipped health systems. We hope that Congress will add to these essential resources in the near future.”

Other groups also gave a cautious response to the agreement.

Related: CDC Almost Out of Zika Cash

“While we are satisfied this was the best compromise Congress could achieve at this time, the funding has been direly needed for months and is still less than the President’s request,” the Trust for America’s Health said.

“In addition, these measures fail to repay funds that were redirected from our nation’s ongoing Ebola response initiatives—hurting efforts to prevent a resurgence of that devastating and highly infectious disease.”

And Zika is going to need funding for years.

Related: NBC News Full Coverage of Zika

“Every day we learn something new about the impacts of this virus, especially on fetal brain development. The list of what we do not know about the transmission and aftereffects of the virus remains long and the delay in funding has hindered critical research efforts,” the Trust said.

Burwell said it can cost anywhere between $1 million and $10 million to care for a child born with microcephaly. Some babies die soon after birth while those that survive need various degrees of care, depending on their impairment.

Fan Tait of the American Academy of Pediatrics says Zika-affected babies will impact state, federal and local health providers. “This will stretch every system of care,” she told a meeting on Zika sponsored by the NIH last week.