Bacterial spot caused by Xanthomonas euvesicatoria, X. vesicatoria, X. perforans and X. gardneri is one of the most destructive diseases in tomatoes (Solanum lycopersicum L.) growing in tropical and subtropical regions. Exploring resistance genes from diverse germplasm and incorporating them into cultivated varieties are critical for controlling this disease. The S. pimpinellifolium accession PI128216 was reported to carry the Rx4 gene on chromosome 11 conferring hypersensitivity and field resistance to race T3. To facilitate the use of marker-assisted selection in breeding and map-based cloning of the gene, an F(2) population derived from a cross between the susceptible variety OH88119 and the resistant accession PI128216 was created for fine mapping of the Rx4 gene. Using 18 markers developed through various approaches, we mapped the gene to a 45.1-kb region between two markers pcc17 and pcc14 on chromosome 11. A NBS-LRR class of resistance gene was identified as the candidate for the Rx4 gene based on annotation results from the International Tomato Annotation Group. Comparison of the genomic DNA sequences of the Rx4 alleles in PI128216 and OH88119 revealed a 6-bp insertion/deletion (InDel) and eight SNPs. The InDel marker was successfully used to distinguish resistance and susceptibility in 12 tomato lines. These results will facilitate cloning the Rx4 gene and provide a useful tool for marker-assisted selection of this gene in tomato breeding programs.