Some Philadelphia public schools are understaffed and risk losing federal grant funding as a result, City Controller Alan Butkovitz said in an audit released Wednesday.

Schools that educate large numbers of students living in poverty  receive extra funding through a federal program known as Title I. To meet its requirements, schools must have adequate staff as defined by the Pennsylvania Department of Education.

Butkovitz's office tested 23 Philadelphia district schools for compliance. Seventeen  lacked proper staffing per the Title I guidelines. In total, the schools were 48 staffers short.

The School District has struggled with filling vacancies amid a national teacher shortage and a contract that has been unsettled for nearly four years.

Frankford High, Benjamin Franklin High, Bartram High, Ethan Allen Elementary, and Huey Elementary had the highest ratios of noncompliant staffing levels, Butkovitz said.

"The School District puts itself at risk for the possible loss of much-needed educational dollars when it does not follow guidelines," Butkovitz said in a statement. "The grant funding requirements are specific in that all schools receive comparable money for the number of students it educates."

The district has acknowledged it must do better.

It has embarked on a high-profile radio and social media marketing campaign, and has received 277 applications for open jobs for this school year since January.

"It is encouraging that the School District has taken several actions to increase their staffing levels," Butkovitz said. "They have the opportunity now to fill all required positions before they must tackle the looming budget deficit."

School officials said they take grant funds and funding obligations seriously, emphasized that they have never lost grant funding, and said they will work to keep that unchanged.

"The School District of Philadelphia is committed to making every effort to fill vacant positions, especially when the positions are essential to meeting the needs of our students," Lee Whack, a district spokesman, said in a statement. "In this school year, the district has filled 99 percent of its teaching positions."

Whack said the district had removed one barrier to filling open jobs: for employees paid less than $40,000, it covers the costs of clearances, physicals, etc.

"We will also continue to take new actions to improve employee recruitment and retention so every school is adequately staffed to fulfill the needs of our students," Whack said. "The district appreciates the controller for acknowledging our efforts to resolve this matter."