An epidemic of bird flu that has devastated U.S. poultry flocks this year is likely to be under control within four months as the United States steps up measures to contain the virus, the head of the World Organisation for Animal Health (OIE) said.

However, there is a high risk that strains of the virus will continue to spread within the American continent, mainly Mexico, which should prompt farmers and authorities to boost biosecurity measures, OIE Director General Bernard Vallat told Reuters.

The U.S. poultry industry is confronting its biggest outbreak of bird flu on record, which has led to the death or culling of 40 million birds after confirmation on commercial farms and backyard flocks in 16 U.S. states and in Canada.

The disease, which manifests in several physical symptoms and a sharp drop in egg production, has led to a sharp rise in egg prices, forcing food producers to look for alternatives.

"I think it cannot worsen in the United States," Vallat said. "Given the scale of the damage and the pressure on farmers I believe they will quickly protect themselves more efficiently. There are huge economic stakes here."

Although the U.S. bird flu toll could reach 50 million, the infection rate has reached a top, Vallat said, predicting the end of the epidemic in September, with possible sporadic cases every few weeks.

That compared with 34 outbreaks of the highly infectious H5N2 and H5N8 strains on farms or backyards between April 27 and May 8, leading to the death or culling of 9.9 million birds, U.S. government reports posted on the OIE website showed.

Summer conditions should also help as the virus weakens in warm weather, reducing transmission risks.

The bird flu epidemic in the United States was particularly severe because farmers were not prepared, and because of the size of its farms, Vallat said.

"U.S. farms are more concentrated than in other countries such as in the European Union. Of course this has an impact on the number of birds infected or killed," he said. "When a virus enters a farm like that, it's a real disaster."

While the U.S. threat is seen fading, Vallat highlighted risks to other countries in the region, particularly Mexico, and urged a stronger approach to biosecurity measures.

These include early detection and surveillance but also simple steps such as protecting feed from wild birds, and disinfecting everything entering farms including people, trucks and veterinarians, he said.

Outbreaks of a different strain of bird flu virus, H7N3, in Mexico in 2012 and 2013 led to the death of nearly 20 million birds over two years, data showed.