Spatial transcriptomic technologies promise to resolve cellular wiring diagrams of tissues in health and disease, but comprehensive mapping of cell types in situ remains a challenge. Here we present сell2location, a Bayesian model that can resolve fine-grained cell types in spatial transcriptomic data and create comprehensive cellular maps of diverse tissues. Cell2location accounts for technical sources of variation and borrows statistical strength across locations, thereby enabling the integration of single-cell and spatial transcriptomics with higher sensitivity and resolution than existing tools. We assessed cell2location in three different tissues and show improved mapping of fine-grained cell types. In the mouse brain, we discovered fine regional astrocyte subtypes across the thalamus and hypothalamus. In the human lymph node, we spatially mapped a rare pre-germinal center B cell population. In the human gut, we resolved fine immune cell populations in lymphoid follicles. Collectively, our results present сell2location as a versatile analysis tool for mapping tissue architectures in a comprehensive manner.