We hypothesized that habitats differing in water flow regime would differ in bacterial function either because of differences in the local environment, in bacterial community composition (BCC), or in the mechanism shaping BCC (community assembly). In 20 lakes and 17 inlet streams BCC was analyzed by terminal restriction fragment length polymorphism of the gene coding for 16S ribosomal RNA, and bacterial function was estimated as bacterial production rate (BP, measured as leucine incorporation) per content of dissolved organic carbon (DOC) (BP : DOC). BCC in both lakes and streams appeared to be shaped by local environmental forces (i.e., species sorting according to metacommunity theory), but not by massive introduction of cells from the drainage area (mass effect). BP : DOC was lower in streams than in lakes, which appeared to be both because of differences in BCC and environment between lakes and streams, independent of each other. We found no support for an effect of water flow regime in itself (i.e., cell dispersal rate) causing the lower functionality of the streams. In streams, BP : DOC was correlated to both BCC and environment, independent of each other, while in lakes function could not be explained by either BCC or environment. The greater environmental variability among our streams than among our lakes may be the cause for the stronger BCC-function coupling in our streams, since smaller environmental variation among our lakes would allow a greater functional redundancy.