DALLAS—As Texas schools scrounge for cash to buy supplies and threaten to lay off teachers, $830 million in education funding earmarked for the state is sitting at the federal Department of Education.

The money, part of the stimulus package passed last year by Congress to help U.S. schools, is trapped by an increasingly hostile battle between the state's Republican and Democratic politicians over how to use it—to the dismay of school districts facing an almost $10 billion shortfall in state aid.

Democrats in the state's congressional delegation included a provision in the federal legislation requiring Texas to use the money to supplement existing spending. In the past, they contend, Republicans have replaced state education dollars with federal money, then used the savings for other purposes.

"Federal aid to education should actually aid education in our local Texas schools, not provide a bailout to the governor for his mismanagement of the state budget," said U.S. Rep. Lloyd Doggett, a Democrat who represents part of Austin.

But Texas Gov. Rick Perry, a Republican, said Mr. Doggett is essentially asking him to break state law by committing to maintain education's share of the state budget for two years. During his state-of-the-state address last month, Mr. Perry accused the congressman of punishing the state "in pursuit of his own agenda."