Coronaviruses affected the upper and lower respiratory tracts in humans.
They are the reason for up to a third of common colds.
A more severe strain of the virus, thought to have come from bats, triggered the global SARS (Severe Acute Respiratory Syndrome) epidemic in 2002 that killed nearly 800 people.
The Middle East Respiratory Syndrome (MERS) is a new strain discovered in Saudi Arabia in 2012 and thought to have originated in camels.
More deadly but less contageous, it has so far killed 193 people across 636 confirmed cases.
But now a team of scientists led by Edward Trybala from the University of Gothenburg in Sweden, and Volker Thiel from the University of Bern have discovered a compound called K22, which appears to block the ability of the virus to spread in humans.
They first noticed that K22 was able to combat a weak form of coronavirus that causes mild cold-like symptoms, and went on to show that it can fight more serious strains, including SARS and MERS.
In an article for specialist journal "PLOS Pathogens", the scientists explained that the virus reproduces in the cells that line the human respiratory system.
The virus takes over the membranes that separate different parts of human cells, reshaping them into a sort of armour around itself in order to start its production cycle.
But K22 acts at an early stage in this process, preventing the virus from taking control of the cell membranes.
"The results confirm that the use of the membrane of the host cell is a crucial step in the life-cycle of the virus," the researchers wrote.
Their work shows that "the process is highly sensitive and can be influenced by anti-viral medications."
They said the recent SARS epidemic and MERS outbreak mean there should be urgent investment in testing K22 outside the laboratory and developing medicines.
Earlier this month, experts gathered in Geneva by the World Health Organization confirmed that MERS was spreading but had yet to reach the level of global emergency.
Most of the MERS cases and deaths so far have been in Saudi Arabia, but the virus has been imported to more than a dozen other countries.
All of those cases have involved people who became ill while in the Middle East.
Iran registered its first death from MERS on Thursday, and has registered six cases of the infection.