TRENTON, N.J. – Nicholas deBelleville Katzenbach, who held influential posts in the Kennedy and Johnson administrations and played a prominent, televised role in federal desegregation efforts in the South, has died. He was 90.

Katzenbach’s eight years in government during the 1960s began with the idealism of Robert Kennedy’s Justice Department and ended in the exhaustion and despair of the Johnson administration’s State Department. Katzenbach never was as famous as the men he worked for, but few government officials were so engaged in so many historical moments, both in the U.S. and overseas.

“Throughout his long and singular career in the nation’s service, Nicholas Katzenbach combined realism, loyalty, and supreme equability with a bedrock devotion to principle, especially on civil rights, said Princeton University history professor Sean Wilentz, a longtime friend of Katzenbach. “He was one of his generation’s giants, and history will remember him that way.”

Katzenbach was a graduate of Princeton and Yale, and a former prisoner of war. He had the intellect and resolve that Robert Kennedy was looking for as he staffed his Justice Department. Burke Marshall, future Supreme Court Justice Byron White and future Watergate prosecutor Archibald Cox were others hired to serve in Justice. Their short time together still is regarded as a high point for the department.

They were young, gifted and clear-headed and operated under the “code of the Ivy League Gentleman,” Victor Navasky wrote in the acclaimed “Kennedy Justice,” published in 1971.

The Cold War, civil rights, Vietnam and the murder of a president would test the code.

Katzenbach wrote a legal brief in support of President John F. Kennedy’s decision to blockade Cuba during the 1962 missile crisis and helped secure the release of prisoners captured during the disastrous Bay of Pigs raid on Cuba in 1961. He became a deputy attorney general in 1963 and, after Kennedy’s assassination, served as attorney general and an undersecretary of state under Lyndon Johnson, who was in Dallas with Kennedy when the president was shot.

Katzenbach’s first job for Johnson was simple, but sensitive. The new president was on Air Force One and wanted to be sworn in as soon as possible. Katzenbach, in Washington at the time, agreed to speak with Johnson aide Jack Valenti and read to him the exact wording of the oath of office.

Katzenbach, who helped work on the 1964 Civil Rights Act signed into law by Johnson, had been the Kennedy administration’s point man when James Meredith became the first black to enroll at the University of Mississippi in 1962.

The following year, he was the federal official on hand when segregationist Alabama Gov. George Wallace made his infamous “stand in the schoolhouse door” — symbolically attempting to block two black students, Vivian Malone and James Hood, from entering the University of Alabama.

Looking businesslike in a suit and tie, his bald head sweating under the Alabama sun, Katzenbach walked up to the school’s entrance and handed Wallace, who stood in the shade, a presidential proclamation saying he must obey the law. The nation watched on television, including a nervous Robert Kennedy at his office in Washington.

A few months after the face-off in Alabama, Katzenbach again stepped up, in the days following Kennedy’s assassination. On Nov. 25, three days after the slaying, Katzenbach sent a memo to Johnson aide Bill Moyers urging that results of the FBI’s investigation be made public to combat any notion that Lee Harvey Oswald had not acted alone.

In February 1965, Johnson picked Katzenbach as his attorney general, but he held the post for less than two years, feuding with FBI Director J. Edgar Hoover and others before stepping down in October 1966. A short time later, he was named an undersecretary of state, a post he held for the remainder of the Johnson administration and which led to an unhappy entanglement with the Vietnam War.

In testimony before the Senate’s Foreign Relations Committee in 1967, Katzenbach made a controversial defense of the war’s legality, citing the 1964 Gulf of Tonkin resolution.

“What could a declaration of war have done that would have given the President clearer authority?” Katzenbach said.

Katzenbach believed his testimony was accurate, but acknowledged its unpopularity. Philip Roth and Jules Feiffer were among the artists who took out a full-page newspaper ad condemning his remarks. Sen. Eugene McCarthy of Minnesota would cite Katzenbach as a reason for running for president in 1968 as an anti-war candidate.

In 1969, Katzenbach became IBM’s general counsel and helped represent the computer giant in its long fight against an anti-trust lawsuit filed by the government and eventually dismissed. He remained active in national Democratic politics and constitutional issues.