Habronema muscae

Habronema muscae is an internal stomach parasite that is most commonly found in horses. It is the most common cause of cutaneous ulcerative granulomas in the horse. It is in genus "Habronema".
Life cycle.
Eggs.
The parasitic adult female worms lay eggs within the horse's stomach. The eggs are later excreted through the feces. The eggs hatch out within the feces producing first stage larvae.
Larvae.
After the eggs have hatched in the feces, the larvae are ingested by the maggots of various flies that lay their eggs in the feces (such as "Stomoxys" (the stable fly) or "Musca" (the house fly). The nematode larvae develop within the maggot for about one week (depending upon ambient temperature), as the maggots mature into the imago (adult) fly. The infective larvae (L3 larval stage) migrate to the mouthparts of the fly, where they are passed on to the horse when they feed around the horse's moist areas such as wounds, nostrils, lips, and eyes. If the larvae are deposited into open wounds, or broken skin they can cause intense granulomatous reactions, producing an ulcerated irritation called Habronemiasis, or more commonly, "summer sores". They may also invade the eye and the eye membrane causing a persistent conjunctivitis. If the larvae find their way up through the nose they can migrate into the lungs and cause tiny abscesses around where they embed in the lung tissue.
Adults.
When the larvae are licked and swallowed by the horse during grooming they travel to the stomach and embed themselves into the glandular part of the stomach close to the margo plicatus. A thick mucus is excreted by the stomach lining. The larvae mature into adults and females produce eggs to complete the life cycle. Larvae that invade skin or eye tissue do not develop into adults.
Morphology:
Adult has two lateral lips, dorsal and ventral lips may also be present. Buccal capsule cylindrical, chitinous. Oesophagous is divided into two parts, a short anterior muscular and long posterior glandular portion, intestine simple without any diverticula. Male: spicules unequal, gubernaculum present and bears 4 pairs of preanal, 1 pair adanal and 2 pairs of postanal pedunculated papillae, 3 pairs of sessile papillae also present, tail spirally twisted.
Treatment.
For most horses, the lesions will resolve by the end of summer. Topical or systemic treatment with Ivermectin is effective against Habronemiasis. Ivermectin or moxidectin can eliminate nematodes in the stomach. Glucocorticoids or antihistamines may be necessary to control inflammation, tissue proliferation, hypersensitivity, or pruritus. Surgical excision may be required to remove large masses. 
Prevention.
Prevention is primarily through regular deworming of the horse and good fly control systems, especially removal of manure. Environmental sprays and clean bedding also help.