This is Fire Blight, a bacterial infection commonly spread by bees and other
pollinators. Hence the infection usually starts at the blossoms. It typically extends
into the branches and twigs, but is often localized. It can, however spread into the
tree (especially a weakened tree). Death is inevitable if the infection reaches the
roots.
Pears are especially susceptible, but it can also infect apples and roses. Infections of
hawthorns, cotoneaster, and mountain ash are also not unknown.
The bacteria (Erwinia amylovora) turns dormant or dies with frost, so outbreaks
tend to be more severe after a mild winter.
Treatment with antibiotics only works before infection, and is strongly discouraged due to
the evolution of disease resistance.
Copper sprays may also have some effectiveness if applied as blossoms open out. These are ineffective against existing infections.
Instead, treatment should be by removing the infected branches. Shears should be dipped
in bleach between each cut in order to disinfect them and to avoid spreading the infection
further. Cuts should be a few inches back from the visible infection. Typically the
core of a branch will be infected below the visible damage.
Further information can be found at: