The flamboyant head of the government's program to improve science education, a bureaucrat who wore "Science Is Fun!" buttons and got Congress to support huge increases for education, is being ousted.

Bassam Z. Shakhashiri, until now the assistant director of the National Science Foundation's education directorate, will be replaced by Luther S. Williams, an NSF official who three weeks ago recommended sweeping changes in the way money for science education is earmarked at NSF. Educators said the proposal by Williams would have derailed efforts to bolster science in the classroom.

A controversial and colorful proponent of science education, Shakhashiri was unique among NSF administrators for taking his case personally to Congress and the news media, where he argued passionately for increased funding and visibility for science education. Shakhashiri oversaw the growth of the education directorate from $55 million in 1985 to President Bush's current request for more than $250 million.

While Shakhashiri's efforts produced more money for education, they caused jealousy and bitterness within NSF, where other science programs have seen modest or flat increases. NSF is the agency responsible for funding almost all basic research that does not have immediate military or medical applications.

Shakhashiri said yesterday that NSF Director Erich Bloch told him he could either return to his job as a professor at the University of Wisconsin or accept transfer to another job within NSF.

"I am puzzled why in essence I am being fired," Shakhashiri said. "I came here when science education was decimated. I have rebuilt it. I am committed to that. I have dedicated my life to that." In the Job 'Too Long'

Shakhashiri said he was being removed because Bloch felt he had been in the job "too long." NSF officials put it this way: "There was the feeling it was time for new leadership." Shakhashiri said he had not decided what he would do, but was leaning toward staying at NSF in some capacity.

Margaret MacVicar, dean of undergraduate education at the Massachusetts Institute of Technology and chairman of an education advisory panel for NSF, said she was "surprised" that Shakhashiri has been ousted. MacVicar said Shakhashiri's "extraordinary commitment" to science education was responsible for the issue's growing visibility and increased funding.

Bloch is scheduled to announce today that Shakhashiri will be replaced by Williams, who is currently an assistant to Bloch and was previously president of the historically black Atlanta University, now Clark-Atlanta University.

Williams was chairman of an NSF policy committee that recommended in May removing responsibilities from the education directorate and dividing the duties, and more importantly the money, among the other competing divisions at NSF, a move Shakhashiri said would "emasculate" science education at the agency. The NSF is divided into seven science directorates, each of which supports different scientific disciplines and competes with the others for funds.

The plan, which Williams proposed to Bloch and which was endorsed by the leadership of competing divisions within NSF, was discussed but not adopted, according to NSF officials.

Educators and interested scientists agreed with Shakhashiri that the plan proposed by Williams and his committee would have derailed science education at NSF. Bill Aldridge, executive director of the National Science Teachers Association here, said the plan proposed by Williams would have "destroyed" the ambitious programs at NSF and that over time the other competing interests there would have absorbed money meant to go to science education.

"It's an outrageous thing to do, especially when everyone, including Congress, has been calling for more support of science education," Aldridge said.

Teacher Group Alerts Congress

When Aldridge learned of Shakhashiri's ouster and heard of plans for reorganizing science education at NSF, he alerted Congress, which has strongly supported science and technology education. A series of reports has concluded that science education is in dismal shape and that most Americans wouldn't know the difference between a molecule and an atom.

Aldridge said he suspected that pressure from Congress might have been responsible for Bloch's decision not to radically alter science education at NSF. Raymond Bye, Jr., director of the foundation's Office of Legislative and Public Affairs, said that pressure from Congress didn't influence Bloch, who is leaving NSF sometime this summer when his six-year term ends.

Bloch is expected to announce today a partial reorganization of education programs at NSF. Projects that involve minorities and women are to be added to the education division. Bye said Williams will provide "fresh new leadership" and will strengthen, not weaken, science education at the NSF.