The construction and the testing of two lambda phage vectors are described that greatly simplify the tasks of mapping genomic DNA and making replacement-type gene-targeting vectors for mammalian cells from a library of isogenic genomic DNA. The first vector, lambda PS, accommodates up to 20 kb and allows inserts to be automatically subcloned in plasmid form because of the presence of loxP sites flanking the insert. The second vector, lambda KO, accommodates up to 16.7 kb and allows inserts to be automatically subcloned as plasmids containing HSVtk genes that are positioned flanking the inserted genomic DNA. We have prepared highly redundant libraries from genomic DNA of 129/Sv-strain mice for the construction of targeting vectors. In our scheme, the locus of interest is characterized using a library made in lambda PS. For instance, suitable flanking probes can be derived to determine targeting events. The final targeting construct with flanking HSVtk genes is obtained using the lambda KO cloning vector. The entire procedure is exemplified by successful targeting of the X-linked mouse hprt locus.