Tested on 1,000 patients, the ointment was 100 percent effective in preventing the disease if applied twice daily for three days within 72 hours after being bitten by a tick, University of Vienna scientists reported in The Lancet medical journal.
"None have developed Lyme," said research leader Bern Jilma.
In the group receiving a placebo, seven patients contracted Lyme.
Discovered in the United States in 1975, the disease is caused by so-called Borrelia bacteria, which can lead to grave neurological and joint problems if untreated.
The flu-like symptoms include muscle and joint ache, headache, nausea and vomiting.
The disease has been on the rise in Europe with some 200,000 new cases identified every year, including 24,000 in Austria, according to the new study.
Traditionally, people suspected of having the disease may have to take a strong dose of antibiotics for up to three weeks.
The cream, which is currently still in its testing phase, could help avoid such drastic treatments, researchers said.
Around 20 percent of ticks in Europe carry the Borrelia bacteria.