The Senate confirmed federal Judge Michael Chertoff as the nation’s second Homeland Security secretary on Tuesday, placing the tough-on-terrorism former prosecutor in charge of a bureaucracy prone to infighting and turf wars.

Chertoff, 51, has promised to balance protecting the country with preserving civil liberties as head of the sprawling agency that was created as a result of the Sept. 11, 2001, terror attacks.