Fungi and bacteria are the primary decomposers in terrestrial ecosystems. They break down complex organic matter from dead plants and animals into simpler inorganic nutrients. This process is essential for nutrient cycling and maintaining soil fertility.