The microbiology of subsurface, hydrothermally influenced basaltic crust flanking mid-ocean ridges has remained understudied, due to the difficulty in accessing the subsurface environment. The instrumented boreholes resulting from scientific ocean drilling offer access to samples of the formation fluids circulating through oceanic crust. We analyzed the phylogenetic diversity of bacterial communities of fluid and microbial mat samples collected in situ from the observatory at Ocean Drilling Program Hole 896A, drilled into ~6.5 million-year-old basaltic crust on the flank of the Costa Rica Rift in the equatorial Pacific Ocean. Bacterial 16S rRNA gene sequences recovered from borehole fluid and from a microbial mat coating the outer surface of the fluid port revealed both unique and shared phylotypes. The dominant bacterial clones from both samples were related to the autotrophic, sulfur-oxidizing genus Thiomicrospira. Both samples yielded diverse gamma- and alphaproteobacterial phylotypes, as well as members of the Bacteroidetes, Planctomycetes, and Verrucomicrobia. Analysis of ribulose-1,5-bisphosphate carboxylase/oxygenase (RuBisCO) genes (cbbL and cbbM) from the sampling port mat and from the borehole fluid demonstrated autotrophic carbon assimilation potential for in situ microbial communities; most cbbL genes were related to those of the sulfur-oxidizing genera Thioalkalivibrio and Thiomicrospira, and cbbM genes were affiliated with uncultured phylotypes from hydrothermal vent plumes and marine sediments. Several 16S rRNA gene phylotypes from the 896A observatory grouped with phylotypes recovered from seawater-exposed basalts and sulfide deposits at inactive hydrothermal vents, but there is little overlap with hydrothermally influenced basaltic boreholes 1026B and U1301A on the Juan de Fuca Ridge flank, suggesting that site-specific characteristics of Hole 896A (i.e., seawater mixing into borehole fluids) affect the microbial community composition.