Two more people have been infected by Ebola in Liberia, the government said Thursday, sparking fears that an epidemic which killed thousands before being eradicated is gaining a hold once again.

The west African nation announced on June 30 that a 17-year-old boy had died of the tropical fever after spreading it to two other people, the first cases of infection for more than three months.

"There are two new confirmed cases in Liberia. This makes the total of five confirmed cases in Liberia," the health ministry said in a statement.

It said both new cases, who are being treated in the capital Monrovia, came from the same village in the coastal county of Margibi where the latest outbreak emerged.

It added that the pair had been in contact with 149 people, the vast majority in Margibi but 17 in neighbouring Montserrado County, which includes Monrovia, a city of around one million people.

Ebola killed more than 4,800 Liberians before the World Health Organization declared the country free of transmission on May 9, 42 days after the last confirmed case was buried.

The source of the new outbreak remains a mystery, with the WHO describing the cluster as "separate" from the main epidemic.

The virus is spread among humans via the bodily fluids of recently deceased victims and carriers showing symptoms, including vomiting, diarrhoea and -- in the worst cases -- massive internal and external bleeding.

Experts have speculated that the teenager may have been infected by an entirely new variant of the virus from an animal, rather than from a human.

Locals in Margibi say the boy cooked and ate a recently deceased dog shortly before falling ill, and local and international media have been rife with speculation that this was the source.

There is limited evidence that dogs can become infected with Ebola but none has ever been shown to have developed disease or demonstrated the ability to pass the virus to humans.

Liberia's Centers for Disease Control (CDC) issued a statement however saying it had not ruled out the dog hypothesis.

"CDC takes the rumours very seriously and is currently investigating the possibility of dogs being carriers for the virus," it said.

"The Ministry of Health, together with CDC, is also investigating all other possible transmission routes -- sexual transmission, eating infected bush meat, unsafe burial or because the boy might have travelled to Guinea."

Guinea, where the outbreak started in December 2013, and neighbouring Sierra Leone have been reporting 20 to 27 cases a week since the end of May.