Why does a single fire ant Solenopsis invicta struggle in water, whereas a group can float effortlessly for days? We use time-lapse photography to investigate how fire ants S. invicta link their bodies together to build waterproof rafts. Although water repellency in nature has been previously viewed as a static material property of plant leaves and insect cuticles, we here demonstrate a self-assembled hydrophobic surface. We find that ants can considerably enhance their water repellency by linking their bodies together, a process analogous to the weaving of a waterproof fabric. We present a model for the rate of raft construction based on observations of ant trajectories atop the raft. Central to the construction process is the trapping of ants at the raft edge by their neighbors, suggesting that some "cooperative" behaviors may rely upon coercion.