The response of a startled sea cucumber has inspired a new material that could one day be used to build brain implants for patients with Parkinson's disease.
The material can rapidly switch from being rigid to flexible and vice versa.
Writing in the journal Science, US researchers describe how species of the sea creatures "tense" when threatened.
The new material mimics this ability, and could be used to make advanced brain electrodes which are stiff when implanted, yet supple inside the body.
Adding water changes the state of the material.
"The water acts as a chemical switch,"
Dr Christoph Weder, one of the team who developed the material, told the BBC News website.
This is important as the brain is around 75% water.
The material consists of naturally occurring nanofibres, or "whiskers", carefully embedded in a polymer.
The cellulose fibres, each just 25 nanometres (billionths of a metre) in diameter, are taken from a different sessile sea creature known as a tunicate or sea squirt.
"There are many sources of nanofibres such as cotton or wood,"
said Dr Weder.
The structure of the un-named material mimics the skin of sea cucumbers which have collagen nanofibres embedded in a soft connective tissue.
"These creatures can reversibly and quickly change the stiffness of their skin,"
explained Dr Jeffrey Capadona, another member of the team.
"Normally it is very soft; but for example in response to a threat, the animal can activate its 'body armour' by hardening its dermis."
Changes to the stiffness of the sea cucumber's skin are thought to be triggered by chemicals secreted by the animal's nervous system that rearrange the collagen threads.
"Our architecture is the same, but the chemistry is different,"
explained Dr Weder.
In the absence of water, the nanofibres are held together by chemical links known as hydrogen bonds. This gives the material its rigidity.
When exposed to water, the water molecules "competitively bond" with the fibres.
"The water also likes to stick to the cellulose,"
said Dr Weder.
This has an effect of "ungluing" the fibre-to-fibre bonds, and the material becomes about 1,000 times softer, with the consistency of rubber.
When the water evaporates, a network of cross-linked whiskers reforms, stiffening the material.
This ability to morph could help build therapeutic devices to be implanted into the brains of patients who suffer from Parkinson's disease, stroke or spinal cord injuries.
At present, there are a number of research teams hoping to develop "artificial nervous systems" that aim to treat these disorders.
These systems need to "plug" into nerve cells within the brain - known as cortical neurons - to record electrical activity.
But animal studies have shown that the quality of the brain signals recorded by implanted electrodes often degrades after a few months.
One hypothesis is that stiff electrodes damage the surrounding brain tissue.
"There is a mechanical mismatch - the electrode is rigid but the brain is more like jello,"
said Dr Weder.
The team believes that an implant built on a substrate of the new material could overcome this problem, by being rigid during implantation, and softening once in the body.
Dr Weder also has his eye on other applications for the material. Potentially, electricity rather than water could be used to switch its state.
"Smart bullet proof vests, prosthetics - the list goes on and on,"