A bite from a tsetse fly is an extremely unpleasant experience. It is not like a mosquito, which can furrow its thin mouthpart directly into your blood, often without you noticing. In contrast, the tsetse fly's mouth has tiny serrations on it that saw into your skin on its way to suck out your blood.

To make matters worse, several species of tsetse fly can transmit diseases. One of the most dangerous is a parasite that causes "sleeping sickness", or "human African trypanosomiasis"to give it its official name. Without treatment, an infection is usually fatal.

Like so many tropical diseases, sleeping sickness has often been neglected by pharmaceutical researchers. However, researchers have long endeavoured to understand how it evades our bodies' defence mechanisms. Some of their insights could now help us eliminate sleeping sickness altogether.

There are two closely-related single-celled parasites that cause this deathly sleep: Trypanosoma brucei rhodesiense and T. b. gambiense. The latter is far more prevalent: it is responsible for up to 95% of cases, mostly in western Africa. It takes several years to kill a person, while T. b. rhodesiense can cause death within months. There are still other forms that infect livestock.

After the initial bite, sleeping sickness symptoms often start with a fever, headaches and aching muscles. As the illness goes on, those infected become increasingly tired, which is where it gets its name. Personality changes, severe confusion and poor coordination can also happen.

A person can have no symptoms but still both harbour the disease and spread it

While medication does help, some treatments are toxic and can themselves be lethal, especially if they are given after the disease has reached the brain.

It is worth noting that sleeping sickness is no longer as deadly as it once was. In the early 20th Century several hundred thousand people were infected each year. By the 1960s the disease was considered "under control" and had reached very low numbers, making its spread more difficult. But in the 1970s there was another major epidemic, which took 20 years to control.

Since then, better screening programmes and earlier interventions have reduced the number of cases dramatically. In 2009 there were fewer than 10,000 cases for the first time since records began, and in 2015 this figure dropped to fewer than 3,000, according to the latest figures from the World Health Organisation (WHO). The WHO hopes the disease will be completely eliminated by 2020.

While this decline looks positive, there may be many more cases that go unreported in rural Africa. To eliminate the disease completely, infections have to be closely monitored.

More problematically, a series of new studies have shown that the parasite is more complicated than previously believed.

Sleeping sickness has always been considered – and diagnosed – as a blood disease, because T. brucei parasites can readily be detected in the blood of its victims. However, in a study published in September 2016 researchers found that the parasite can reside in the skin and fat, as well as in the blood.

There may even be a higher density of the parasite in the skin than in the blood, says co-author Annette MacLeod of the University of Glasgow, UK. A tsetse fly drinking a person's blood can "take up the skin-welling parasites along with the blood."

You can harbour these parasites for a long time and be okay

That means a person can have no symptoms but still both harbour the disease and spread it. "We think the skin is therefore a hidden reservoir of infection," says MacLeod. People carrying the infection in their skin would not be treated, as those with detectable levels of the parasite in their blood are given medication.

The finding could explain the mysterious 1970s epidemic, and why the disease can spring up in areas that had previously been cleared.

"We had one person from Sierra Leone but hadn't been back for 29 years, and then came down with late-stage sleeping sickness," says MacLeod. "You can harbour these parasites for a long time and be okay."

That is not the only reason why the parasites can evade our immune systems.

In 2014, Etienne Pays of the University of Brussels in Belgium described the history of sleeping sickness as an "arms race" between humans and the parasite. In this battle, our key weapon is a protein called apolipoprotein L1, which is resistant to an earlier form of T. brucei.

This protein was "efficient in killing the parasite in the blood," says Pays. "As far as we know, it was only there to kill the parasite."

Pays now suspects that some people are resistant to all forms of the parasite

Unfortunately, over time the parasite found a way past the protein's protection. While apolipoprotein L1 can still kill the variant that infects cattle, it is not effective against the two T. brucei strains that infect humans. These two "managed to escape," says Pays.

Pays and his team managed to tweak the protein in their lab to make it resistant to T. b. rhodesiense, the rare but more lethal form.

What they did not realise is that there are people in Africa who already have a similar defence system. Thanks to a mutation in the same protein, they have a natural immunity to T. b. rhodesiense. Pays now suspects that some people are resistant to all forms of the parasite.

Unfortunately, this natural immunity comes at a cost. Nobody knows why, but it has been linked to kidney disease in older age.

The challenge is to make a variant with no side effects. Pays's team has made another protein able to kill both forms, but when they tested it in mice the animals died.

The parasite must cross the blood-brain barrier, which blocks most diseases and toxins

Pays is still tweaking this protein in the lab, in the hope that it will provide an effective cure. "We engineered another one, which we are currently testing," he says.

If he can make it work, doctors will simply need to inject the protein into an infected person. It will then kill the parasite and disappear. This is promising, but there is an additional challenge.

The reason sleeping sickness is so deadly is that it can enter the brain. There it causes its most severe symptoms, such as confusion, hallucinations and poor coordination. Once in the brain it becomes harder to treat, and therefore more likely to be fatal. Doctors think of this as the second stage of the disease, the first being when it infects the blood.

To reach the brain, the parasite must cross the blood-brain barrier, which blocks most diseases and toxins. The key question is how it gets through. But again, it seems we may have had the wrong end of the stick.

A study published in October 2016 proposes that sleeping sickness actually has three distinct stages, not two as previously thought.

The first stage is the bite from the tsetse fly, after which the parasite infects the person's blood. In the second stage, which was not previously identified, it appears in the cerebrospinal fluid and in three membranes that surround the brain, known as the meninges. In the third stage, the brain's protective borders break down and a "mass invasion" of trypanosomes crosses the blood-brain barrier and attacks the brain.

The idea is to keep the host alive, so that the parasite has longer to infect others

Michael Duszenko of the University of Tübingen in Germany and his colleagues discovered the second stage in mice. They also found a reason why the third stage sometimes takes months or even years to occur. It turns out the parasite keeps itself in the second stage, actively slowing the progress of the disease.

To do so, it releases a compound called prostaglandin D2, which does two things. First, it induces sleep in the patient, making them more vulnerable to the bite of a tsetse fly. Secondly, it causes some of the parasite cells to start a process called apoptosis, or "cell death". In other words, the trypanosome purposely destroys some of its own cells.

Killing some of your own cells may sound like a bad idea, but doing so "reduces the burden for the host and increases the chance for parasites to be transmitted to the tsetse fly," says Duszenko. The idea is to keep the host alive, so that the parasite has longer to infect others. If the concentration of parasites were to rise too quickly, the host would die before the parasite could spread to another.

This finding may help explain why some people live with chronic levels of the disease for years. Textbooks should now be rewritten accordingly, Duszenko says.

Despite these advances, there remains the problem is that T. brucei is extremely good at staying one step ahead of its hosts' defence.

The parasite is particularly skilled at "antigenic variation": it has over 1,000 versions of the protein in its outer surface but only displays one at a time, so the host's immune system only makes antibodies against the one on display. In the meantime, some of the parasites have switched to another version, which cannot be attacked by these antibodies.

Every time the host makes antibodies against a new wave of parasites, some trypanosomes will switch to a new coat. "The immune response is always trying to catch up with the parasites," says Martin Taylor of the London School of Hygiene and Tropical Medicine in the UK.

Fairly recently there's been an effort to find drugs for these neglected diseases

Partly for this reason, there have been no new drugs for decades. One of the recommended drugs is Pentamidine, which treats first-stage T. b. gambiense. It was developed in 1940. Melarsoprol, which treats the final stage, was developed in 1949. It is toxic and causes death in about 5% of cases.

Another issue is that pharmaceutical companies have not invested much money into research on sleeping sickness: it is a neglected disease.

"The reason they are called neglected diseases is because they were neglected," says Taylor. "Because they are diseases of the poorest people in developing countries, and since it takes millions of dollars to develop a drug to market, there isn't the economic incentive to develop new drugs."

That seems to have changed a bit in recent years. Some pharmaceutical companies have even partnered with not-for-profit organisations who push for new drugs, such as the Drugs for Neglected Diseases initiative.

MacLeod says there are two new drugs "in the pipeline" undergoing trials. "Fairly recently there's been an effort to find drugs for these neglected diseases," she says.

The disease will clearly be around for years to come. But by unlocking more of the parasite's secrets, one day we might be able to put sleeping sickness to bed for the last time.

Join over six million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.