The type IVb pilus of the enteropathogenic bacteria Salmonella typhi is a major adhesion factor during the entry of this pathogen into gastrointestinal epithelial cells. Its target of adhesion is a stretch of 10 residues from the first extracellular domain of cystic fibrosis transmembrane conductance regulator (CFTR). The crystal structure of the N-terminal 25 amino acid deleted S. typhi native PilS protein (DeltaPilS), which makes the pilus, was determined at 1.9 A resolution by the multiwavelength anomalous dispersion method. Also, the structure of the complex of DeltaPilS and a target CFTR peptide, determined at 1.8 A, confirms that residues 113-117 (NKEER) of CFTR are involved in binding with the pilin protein and gives us insight on the amino acids that are essential for binding. Furthermore, we have also explored the role of a conserved disulfide bridge in pilus formation. The subunit structure and assembly architecture are crucial for understanding pilus functions and designing suitable therapeutics against typhoid.