Children were given a probiotic, with a peanut protein, daily for 18 months.
When tested one month later, 80% could tolerate peanuts without any allergic symptoms and after four years, 70% of them were still able to eat peanuts without suffering any side-effects.
Food allergies have risen dramatically in recent decades, with peanut allergy one of the most deadly.
Lead researcher Prof Mimi Tang, of Murdoch Childrens Research Institute in Melbourne, said half the children were consuming peanuts regularly while others were only eating them infrequently.
"The importance of this finding is that these children were able to eat peanuts like children who don't have peanut allergy and still maintain their tolerant state, protected against reactions to peanuts," she said.
Prof Tang said it was the first time a treatment for peanut allergy had been shown to be effective for this long.
The probiotic used is called Lactobacillus rhamnosus, which has been associated with preventing certain allergic symptoms.
The Australian research team now wants to assess whether the treatment has improved the children's quality of life, as some 250 million people worldwide are affected by food allergy - a number which has more than trebled in the last 20 years.
Peanut allergy, which is one of the most common causes of death from food allergy, has increased at the greatest rate.
Prof Tang said the findings, published in The Lancet Child & Adolescent Health, suggest "the exciting possibility that tolerance is a realistic target for treating food allergy".
She added: "This is a major step forward in identifying an effective treatment to address the food allergy problem in Western societies."
An oral treatment for peanut allergy is still effective four years after it was administered, a study has found.