Results of Bursting Gamma-Rays

Gamma-ray bursts are among the most powerful events in the known universe. They consist of a narrow beam of radiation shot out of supernovas when rapidly rotating stars collapse to form binary neutron stars, black holes or quark stars. These bursts of radiation are incredibly powerful, and their potential effects on the earth could prove devastating. Thus far, all recorded gamma-ray bursts were in other galaxies, so their energy was harmless to the Earth. However, if a burst were to happen in the Milky Way and were aimed at Earth, it could cause untold devastation.
Short-term effects
Depending on the distance and duration of the gamma-ray burst, short term effects range from chemical damage to the stratosphere to total annihilation of the atmosphere. If the atmosphere is chemically damaged, scientists predict that it could deplete about 25% of the world's nitrogen supply. This single factor would lead to poor soil conditions and the breakdown of the entire food chain. If the burst is more powerful, however, it has potential to take the entire atmosphere with it and cause the immediate extinction of nearly every living thing on the planet.
Long-term effects
If the blast is not powerful enough to completely deplete the earth's atmosphere, it would ionize it and cause existing oxygen and nitrogen molecules to bond into nitrogen oxide and nitrogen dioxide gas. Both of these gasses are incredibly toxic and lead to the formation of photochemical smog. If enough of this smog forms, it could cover the planet and darken the sun, leading to an eternal winter across the globe.
The odds of the earth experiencing a direct hit by a gamma-ray burst are infinitesimal, but the potential destruction from such a hit is devastating. Unfortunately, an event like this is beyond human means to control or avoid.