Any child could tell you that an ant is solid. But what about a bunch of ants? To figure that out, you might need to be a physicist. Researchers at the Georgia Institute of Technology found that a group of ants can act like either a solid or a liquid, and that they can switch between the states as needed.

When introduced to a wet surface, fire ants will link up, grabbing one another’s legs to form a solid, seething raft. They can live in one of these rafts for months, says Georgia Tech’s David Hu. But if you introduce a foreign object into a mass of ants, they’ll break apart to let it pass, then reform around it. It’s called “self-healing,” and it’s a highly desirable quality for materials scientists. “They’re like liquid metal,” Hu said in a press release. “Just like that scene in the Terminator movie.”

In a paper in the journal Nature Materials, the team described how fire ants seem able to change rapidly from liquid to solid and back again.

The researchers also found that the fluidity of ants’ movement can be affected by pressure. Physicist Alberto Fernando-Nieves compared the phenomenon to ketchup. “The harder you squeeze, the easier it flows,” he said. “But with ants, this happens much more dramatically than with ketchup."