Struggling Puerto Rico children's hospital gets solar power from Tesla The hospital services some 3,000 children across the island.

 -- A children's hospital in Puerto Rico that was forced to run off generators and ration diesel fuel in the wake of Hurricane Maria now has a solar power system that will supply all of its electricity needs.

Tesla and Puerto Rico's governor touted the project yesterday, sending out multiple official tweets and Facebook posts, and officials said today that the system is already providing solar-generated electricity to the hospital.

The Hospital del Nino is located in the capital San Juan and serves about 3,000 children across the island. The hospital also houses some 30 children with serious medical needs that require round-the-clock care.

A hospital spokesperson told Primera Hora last month that they were forced to ration diesel fuel and take other measures to ensure a constant flow of electricity.

Hurricane Maria also knocked down all of the trees surrounding the hospital, resulting in heat from the withering tropical sun beating down on the building and its surroundings.

Tesla's system works with solar panels that generate electricity during the day and batteries that store the power and distribute it when the sun isn't shining.

Earlier this month, Tesla CEO Elon Musk tweeted that his company could bring solar power to Puerto Rico.

Puerto Rico Gov. Ricardo Rossello replied "let's talk" and later said the two had a "great initial conversation."

Less than three weeks later, officials say the hospital is up and running with a solar system that supplies all of its electricity needs.

"I've never seen a team arrive so fast and work so fast. They built this in a week," Rafael Pagán, the hospital's chairman of the board, told Telemundo.

Just 25 percent of Puerto Rico's 3.4 million residents have electricity, according to the latest figures, and some 3,758 people are still in shelters nearly two months after Maria ravaged the island, causing widespread damages and killing 51 people.

Rossello has promised to fully restore electricity to the island by Christmas, a goal that analysts have cast doubt upon.

Repairing Puerto Rico's badly damaged electrical grid could take months and cost billions of dollars. Musk has put forth his so-called solar microgrids, that produce energy locally through solar energy, as an alternative.

ABC News' Joshua Hoyos contributed to this report.