The federal government is allowed to help its employees pay off their student loans as a way to attract workers with specialized skills and knowledge, but agencies are doing less of that these days amid budget constraints.

Last year, 30 percent fewer federal employees received student-loan repayments from the government, and the total cash amount declined by 25 percent, according to a recent report from the Office of Personnel Management.

“This government-wide decrease in student-loan repayment benefits can be mainly attributed to the continuing budgetary issues being faced by federal agencies,” OPM said.

The drop off raises questions about whether the federal government can compete with the private sector in recruiting highly skilled and highly educated employees, who often carry significant debt from schooling.

National Treasury Employees Union president Colleen M. Kelley said loan-repayment programs can “make the difference between a candidate deciding to come to work for the government or a federal employee deciding to remain in the workforce once trained for the job.”

The NTEU is the second-largest labor group representing federal workers.

Overall, the government spent about $53 million last year repaying student loans for roughly 7,300 federal employees. The average benefit was $7,233 for each individual.

Four agencies issued the vast majority of the repayments, with the Defense Department, Justice Department, Securities and Exchange Commission and State Department accounting for nearly 74 percent of the costs.

The Justice Department experienced the biggest decline in 2013, with its combined repayment value dropping by 64 percent compared to the previous year.

Although agencies generally offer loan repayments to workers in high-demand, such as the three nuclear engineers who received them at the Department of Energy last year, some recipients don’t clearly fit the mold. For example, 14 secretaries and four writer-editors received the benefit in 2013.

Four agencies that previously offered loan repayments stopped doing so in 2013. Among them was the Department of Housing and Urban Development, which spent more than a quarter million dollars on the benefit in 2012 but paid nothing last year.