Methods for organizing materials at the nanometre scale have advanced tremendously in recent years(1,2). One important objective is the synthesis of patterned arrays of inorganic nanocrystals(3-6), whose optical, electronic and magnetic properties might ind technological uses, for example as memory elements. Techniques such as colloidal crystallization(7-9), monolayer deposition(10-12), multilayer casting(13), molecular crosslinking(14,15), the use of complementary interactions(16,17) and the synthesis of nanoparticles in patterned etch pits(18) have been used to organize nanocrystals into superlattices. Here we describe the use of bacterial S-layers-self-assembled, two-dimensionally ordered films of proteins that feature in many bacterial cell walls-as templates for the in situ nucleation of ordered two-dimensional arrays of cadmium sulphide nanocrystals about 5 nm in size. Nucleation of the inorganic phase is confined to the pores between subunits in the S-layers. Two-tier stacks of nanoparticles can be formed in the presence of double-layered protein crystals. The structural diversity of S-layers(19,20), their ease of self-assembly on a nide range of substrates and the potential for surface chemical modification suggest that this approach could be exploited to offer a wide range of ordered nanoparticle arrays.