NEW YORK – The city will end the practice of paying teachers to play Scrabble, read or surf the Internet in reassignment centers nicknamed “rubber rooms” as they await disciplinary hearings, Mayor Michael Bloomberg and the teachers union announced Thursday.

The deal will close the centers, where hundreds of educators spend months or years in bureauratic limbo, costing taxpayers tens of millions of dollars a year. “It’s an absurd abuse of tenure,” Bloomberg said.

Under the agreement with the United Federation of Teachers, most of the teachers will be given administrative or nonclassroom work while their cases are pending. Teachers accused of serious charges including violent felonies will be suspended without pay.

“We’re going to put teachers to work instead of having them sit in rubber rooms while their cases are being resolved,” Bloomberg said.

About 650 educators, more than 500 of them teachers, are in the rubber rooms earning some $30 million in salaries, officials said.

The nickname refers to the padded cells of asylums, and teachers have said the name is fitting, since some of the inhabitants can become unstable.

“There are fights among teachers because some teachers are nuts,” said Leonard Brown, a high school teacher who spent four years in a reassignment center in Queens. “They put crazy people in with very sane people.”

The city has blamed union rules that make it difficult to fire teachers, but some teachers assigned to rubber rooms say they have been singled out because they ran afoul of a principal or they blew the whistle on someone who was fudging test scores.

Teachers who have been assigned to rubber rooms said they welcomed the agreement.