A Pentagon office that became steeped in controversy over privacy issues and a market in terrorism futures was shut down by Congress today as the Senate passed and sent to President Bush a $368 billion military measure that eliminates money for it.

The Pentagon spending plan for 2004 adopted by the Senate says that the office, the Information Awareness Office, which had been headed by Adm. John M. Poindexter, should be ''terminated immediately'' while a few projects under its control could be shifted elsewhere within the Defense Advanced Research Projects Agency. The House passed the measure on Wednesday.

''They turned the lights out on the programs Poindexter conceived,'' said Senator Ron Wyden, Democrat of Oregon, who led opposition to the office. ''From a standpoint of civil liberties, this is a huge victory.''

Congress first turned its attention to the operation headed by Admiral Poindexter, who had been a central figure in the Iran-contra scandal of the 1980's, because of the proposed Total Information Awareness program, a sweeping computer surveillance initiative developed in the aftermath of the Sept. 11 attacks. Critics challenged the program as a potential invasion of privacy.