It never fails. You spend weeks searching for the perfect coffee table, and the first time you set a cup o' joe down, a bit spills over the edge and stains your new living room ornament.

Ever notice how the edges of the stain become darker than the core? This is called the "coffee ring effect", and it's caused by the coffee particles moving to the rim of the stain, while the liquid in the stain evaporates.

Belgian scientists at KU Leuven have found a possible solution for coffee stains: bacteria. In particular, they discovered that Pseudomonas aeruginosa bacteria produce a "bio-soap" - or biosurfactant - that prevents the "coffee ring effect."

The scientists noticed that when a bacteria-filled liquid droplet lands in a petri dish, the cells remain evenly dispersed, even as the water evaporates. However, if they genetically modified the bacteria to block the production of one of its bio-soaps, called rhamnolipid, the bacteria formed "coffee rings."

The researchers found that this bio-soap allows for gradients of surface tension, called the Marangoni effect, to develop in a liquid. Bearing the name of the Italian physicist who discovered these forces in 1865, Marangoni flow allows for a uniform dispersion of particles.

Understanding how biosurfactants work is critical for harnessing their powers for industry.

"Surfactants are inexpensive. It won't be long before we start seeing them turn up in industrial applications," said the authors in a press release.

Along with being used to create better detergents for coffee spills, they are being developed for a wide range of applications, from food processing to productions of paints, cosmetics, household products, and pharmaceuticals. They are ecologically safe and might one day be used to clean up hazardous oil spills or toxins in soil.

Future applications with Pseudomonas aeruginosa seem unlikely as it can cause disease in humans, but the U.S. Department of Agriculture has found similar biosurfactants in a nonlethal cousin, Pseudomonas chlororaphis, with possible applications in farming.

Sempels W, De Dier R, Mizuno H, Hofkens J, Vermant J. Auto-production of biosurfactants reverses the coffee ring effect in a bacterial system. Nat Commun. 2013; 4:1757. doi: 10.1038. Accessed May 14, 2013.

Marchant R, Banat IM. Microbial biosurfactants: challenges and opportunities for future exploitation. Trends Biotechnol. 2012; 30(11):558-65. Accessed May 14, 2013.