- "In the beginning, the Sentinels were just targeting mutants. Then they began to identify the genetics in non-mutants who would eventually have mutant children and grandchildren. Many of the humans tried to help us, but it was a slaughter. Leaving only the worst of humanity in charge. I've been in a lot of wars. I'd never seen anything like this."
- ―Wolverine to Professor X and Beast
The War of the Sentinels was an ongoing conflict that occurred in the original timeline. It was sparked by Mystique's assassination of Bolivar Trask, the scientist responsible for designing the mutant-hunting Sentinels. Over the course of 50 years, the war resulted in much of the world being decimated by battles waged between the Sentinels and mutant resistance groups.
In a final bid to save both humans and mutants, the X-Men and the Free Mutants joined forces to send Wolverine back in time to prevent the creation of the Sentinels. This successfully caused the war and the resulting future never to have occurred in the altered timeline.
Assassination of Bolivar Trask
Driven by the belief that mutants could unite humanity as a whole against a common enemy, Dr. Bolivar Trask devised the Sentinel program and tried pitching it to the United States Congress in 1973. His idea was rejected, as the United States could not back a weapon that targeted a small portion of their population that was living in peace. 
Around the same time, mutant shapeshifter Raven Darkholme had gotten wind of Trask's plans after rescuing a group of mutant soldiers in Saigon. She wanted retribution after discovering that Trask was responsible for conducting medical experiments on several mutant subjects. With knowledge that Trask was going to pitch the Sentinel program to Vietnamese officials on the day of the Paris Peace Accords, Raven traveled to Paris and infiltrated the meeting disguised as a Vietnamese general. However, her ruse was discovered when one of Trask's mutant-detecting devices alerted him to her presence. 
Revealing her true form, Raven single-handedly took on all the men in the meeting room and defeated them. After getting hold of a gun, Raven fired a bullet point directly into Trask's forehead, killing the scientist immediately. However, at this instant, William Stryker regained consciousness from fighting Raven and tazed her, where she was eventually taken to Trask Industries for study. 
Raven's assassination of Trask convinced the U.S. Government that the Sentinel program was needed to deal with any mutant threats that could arise in the future. After it was approved, Trask Industries began studying Raven's DNA in order to grant the Sentinels the ability to adapt to mutant abilities. 
In 2015, with the Sentinel threat imminent, Charles Xavier and Erik Lehnsherr tracked Logan down at an airport and convinced him to rejoin the X-Men.  In the years to follow, the Sentinels went active and commandeered a genocide of the world's mutant population. They also eliminated humans with the potential to have mutant offspring. By 2023, mutants were on the verge of extinction. Most of the survivors were branded with the letter M over their right eye, equipped with inhibitor collars, and ultimately consigned to concentration camps with humans who sided with the mutants. 
Sending Wolverine Back in Time
Since the war began, a mutant resistance group known as the Free Mutants were able to evade the Sentinels through time travel. Kitty Pryde would use her ability to project an individual's consciousness through time by sending Bishop back a few weeks to warn them of any Sentinel attacks.
After using this tactic to avert an attack in Moscow, the Free Mutants relocated to a monastery in China, where they were joined by the surviving X-Men. There, Charles and Erik revealed their plan to send the former back in time to prevent Raven Darkholme from assassinating Trask, which would ensure that the Sentinels were never created. However, due to the sheer stress such a journey through time could have on the human mind, Kitty advised Charles not to do it. This prompted Logan to volunteer to go back instead, as his healing factor would enable him to survive the trip.