WASHINGTON  Not long after he was rousted from bed and seized in a predawn raid in Pakistan in March 2003, Khalid Shaikh Mohammed gave his captors two demands: He wanted a lawyer, and he wanted to be taken to New York.

After a nearly seven-year odyssey that took him to secret Central Intelligence Agency jails in Europe and an American military prison in Cuba, Mr. Mohammed is finally likely to get his wish.

He will be the most senior leader of Al Qaeda to date held to account for the mass murder of nearly 3,000 Americans, facing trial in Manhattan while his boss, Osama bin Laden, continues to elude a worldwide dragnet.

Yet the boastful, calculating and fiercely independent Mr. Mohammed has never neatly fit the mold of Qaeda chieftain. He has little use for the high-minded moralizing of some of his associates, and for years before the Sept. 11 attacks, he refused to swear an oath of loyalty to Mr. bin Laden  figuring that if the Qaeda leader canceled the Sept. 11 plot, he would not have to obey the order.