Puerto Rico Education Secretary Julia Keleher, left, Puerto Rico Governor Ricardo Rossell├│, middle, and U.S. Education Secretary Betsy DeVos tour the Loaiza Cordero School in San Juan, one of many that remains shuttered because of storm damage from Hurricane Maria. (N/A/Puerto Rico Education Department)

Education Secretary Betsy DeVos on Wednesday visited schools in Puerto Rico and the U.S. Virgin Islands where Hurricanes Maria and Irma battered schoolhouses and shut students out of classes for weeks.

Federal education officials have been in communication with administrators on the island territories, aiding with logistical issues and helping them connect with schools on the mainland that are receiving their students.

DeVos met with Puerto Rico Education Secretary Julia Keleher and Governor Ricardo Rossell├│ to discuss how the Education Department might help the schools there, some of which have been closed since Hurricane Maria made landfall in mid-September.

The trio visited Loaiza Cordero Elementary in San Juan, a school badly damaged by the storm. Rainwater seeped into classrooms and sewage backed up onto an outdoor patio, leaving a dark stain, Keleher said. She said she hopes DeVos recognized the challenge of opening all of the island's schools when so many face critical damage.

"It's a significant challenge to overcome," Keleher said. "But the spirit is there."

The island's education department has opened 614 of the 1,113 schools in Puerto Rico, but the vast majority do not have electricity. The department said 44 of the schools are so badly damaged they will probably be shut down. Their students, at least for this year, will be transferred to other schools.

The school system faces other challenges: The storm spurred many more families to leave the island, taking their children with them. Keleher estimates about 14,000 students have left. About 6,000 have enrolled in Florida schools alone.

The island is home to one of the nation's largest and poorest school systems. Before Hurricane Maria landed, 347,000 students attended schools scattered across the island.

The school system was beleaguered by financial difficulties long before Hurricane Maria hit. As an economic crisis deepened, families left Puerto Rico, taking their children with them, and the school system has lost about 18,000 students over the last year. As the island grappled with a deepening debt crisis, Keleher moved to close 179 schools to save $7 million.

In the U.S. Virgin Islands, DeVos visited Charlotte Amalie High School in St. Thomas and the University of the Virgin Islands. Schools on the islands only started to reopen in early October, when they were able to get generators.

In 2014, about 14,000 students were enrolled in schools on the U.S. Virgin Islands, according to the National Center for Education Statistics.

The U.S. Virgin Islands suffered some of the worst damage on American soil from the storms, taking significant hits from Hurricanes Irma and Maria.