On March 4, 1865, with the Civil War drawing to a close, Abraham Lincoln was sworn in to a second term as U.S. president; John Wilkes Booth was in attendance.

Barely six months earlier, Lincoln’s election to a second term as president had been anything but a foregone conclusion. By the summer of 1864, the Civil War stretched into its fourth year, and Union and Confederate troops seemed mired in a bloody stalemate. Lincoln’s prospects for reelection looked dim; some of his fellow Republicans threatened to jump ship and back a third-party candidate, John C. Frémont, while Democrats turned to George B. McClellan, the former commander of all Union armies whose hesitancy to attack the rebels had so frustrated Lincoln in the first years of the war.

But on September 3, a telegram arrived in Washington from Union General William T. Sherman, bringing the news that his troops had captured Atlanta the previous day. It proved to be a crucial turning point in the war, and in the election: On November 8, Lincoln captured 55 percent of the popular vote to McClellan’s 45 percent, along with a landslide victory in the Electoral College. 

As the date for the inauguration approached, there was nothing but good news for the Union on the war front. Sherman’s 60,000 troops stormed through South Carolina, the cradle of secession, while Ulysses Grant’s Union force besieged Petersburg, Virginia, a mere 20 miles from the Confederate capital of Richmond.

The Union was in the mood to celebrate. For the first time in history, Inauguration Day was a national holiday, with festivities taking place in New York, Chicago, Boston, St. Louis, San Francisco and smaller towns and cities across the country. In Washington, as many as 50,000 people gathered underneath the newly completed iron dome of the Capitol. 

Among the crowd were huge numbers of military troops, including many African American soldiers, whom Lincoln had effectively admitted to the Union Army with the issue of the Emancipation Proclamation in January 1863. By war’s end, some 179,000 black soldiers and 10,000 sailors would serve the Union, embodying Lincoln’s growing belief that the Civil War’s true purpose was breaking the curse of slavery.

WATCH: US Presidents on HISTORY Vault

President Lincoln's Second Inauguration, 1865
Buyenlarge/Getty Images
A large crowd of people waiting during President Abraham Lincoln's inauguration, which was held on a rainy day at the U.S. Capitol grounds in Washington, D.C. The crowd includes African American troops who marched in the inaugural parade.

After the swearing-in of the new vice president, Andrew Johnson (who appeared to be heavily intoxicated), a smaller group of spectators and press proceeded from the Senate chamber to the east front of the Capitol, where the main inauguration ceremony would take place. 

Many witnesses at the time, and for years afterward, commented on the fact that the sun broke through the clouds at the precise moment Lincoln began to speak. 

According to journalist Noah Brooks: “The sun, which had been obscured all day, burst forth in its unclouded meridian splendor and flooded the spectacle with glory and light” as the towering president appeared on the platform to deliver what would be the greatest speech of his life.

Many considered this the perfect occasion for Lincoln, who had weathered relentless attacks on his leadership for much of his first term, to congratulate himself and crow a little about the string of recent events. The president, however, took a much different tack. He began by downplaying the significance of this inauguration in comparison to his first one, when the nation hovered on the brink of war and all waited to hear what Lincoln planned to do about it. Now everyone knew where the military situation stood, and Lincoln declined to say much more about it: “With high hope for the future, no prediction in regard to it is ventured.”

After this relatively benign introduction, Lincoln launched into the extraordinary substance of his speech: his vision of the true cause of the war and its ultimate meaning. Lincoln had been working towards this understanding for a long time, and in the second inaugural he would finally express it to his countrymen in the simplest and most eloquent of terms. At the beginning of the conflict, he said, both sides “depreciated war; but one of them would make war rather than let the nation survive; and the other would accept war rather than let it perish. And the war came.”

Make no mistake, Lincoln said, the war’s true cause was slavery, a moral offense that belonged not only to the South, but to the entire nation. In language worthy of Greek and Biblical tragedy, he expressed his belief that God gave America the problem of slavery to solve, and the nation’s great misfortune was that it could only do it through “this terrible war.” Now, Lincoln continued, North and South must work together to justify this tragedy, and confront together the challenge of finding a place for the formerly enslaved people in post-war society.

President Lincoln's Second Inauguration, 1865
Sepia Times/Universal Images Group/Getty Images
A photograph from Lincoln's inauguration on March 4 , 1865.

“With malice toward none; with charity for all; with firmness in the right, as God gives us to see the right, let us strive on to finish the work we are in; to bind up the nation’s wounds; to care for him who shall have borne the battle, and for his widow, and his orphan—to do all which may achieve and cherish a just, and a lasting peace, among ourselves, and with all nations.” 

With those famous phrases, Lincoln completed his speech, which had taken only six or seven minutes for him to deliver. He received only scattered applause while he spoke, and a brief silence met his conclusion, followed by artillery salutes and more hearty applause from the crowd. Chief Justice Salmon Chase then administered the oath of office, and Lincoln’s tragically brief second term began.

On the balcony above the president that day, the 26-year-old actor John Wilkes Booth listened to the second inaugural address with seething hatred for the man who delivered it. At the time, Booth was deeply involved in a plot to kidnap Lincoln and take him to Richmond, where he could be exchanged for Confederate prisoners of war. With the South’s hopes dwindling on the battlefield, however, Booth began to think stronger action was necessary. As he told his friend and fellow actor Sam Chester during a visit to New York in the first days of April 1865: “What an excellent chance I had to kill the President, if I had wished, on Inauguration Day!”

According to some historians, Booth had obtained his ticket for the inaugural ceremony from Lucy Lambert Hale, the daughter of John Parker Hale, a former Republican senator from New Hampshire. A staunch abolitionist, Hale had lost his Senate seat the previous November; Lincoln had recently appointed him as ambassador to Spain. Lucy Hale and Booth met early in 1865 when both were living at the National Hotel, and became secretly engaged soon after that.

Though Booth’s motives were certainly questionable, and he may certainly have pursued Lucy in order to gain closer access to Lincoln’s circles, there is some evidence to suggest he actually loved her. According to his sister, Asia Booth Clarke, her brother “undesignedly fell in love with a senator’s daughter” while engaged in his “desperate work,” resulting in their secret engagement. On that day in New York in early April, Booth told Sam Chester that he was engaged, and was deeply in love with the lady in question. Her only objection to him was that he was an actor, while his only quarrel with her was that she was an abolitionist.

In love or not, an increasingly unhinged Booth returned to Washington from New York on April 9, with the sense that the clock was running down on his kidnapping plot¬—and on the Confederacy itself. Five days later, he was retrieving his mail at Ford’s Theatre when he learned that President Abraham Lincoln would be attending the performance of “Our American Cousin” at the theater that very night.

READ MORE: A Timeline of Abraham Lincoln's Assassination