Mayor Michael R. Bloomberg, escalating his battle with Albany over cuts to city programs, will announce plans to lay off nearly 4,700 teachers as part of a bleak budget to be released on Thursday.

Mr. Bloomberg will portray the reductions as necessary to make up for a loss of $2.1 billion in state aid. But his austere forecast will also serve a political purpose, given the mayor’s desire to wring more money out of the Legislature and to abolish a law that protects veteran teachers.

The mayor, according to a preview of his budget released on Wednesday, will threaten to eliminate 6,166 teaching positions in total: 4,666 through layoffs and 1,500 through attrition. That would reduce the 75,000-person teaching force by 8 percent, and it would be the first time the city has laid off significant numbers of teachers since the 1970s.

State law requires the city to lay off teachers in the reverse order that they were hired, but Mr. Bloomberg has said that merit should factor into the process. He has called on Gov. Andrew M. Cuomo to incorporate changes to the law in his budget.