Capt. Thomas Montgomery's mood swung from jubilant to grief-stricken when he noticed the flag fluttering at half-mast on a steamboat churning down the Mississippi River through Louisiana in April 1865.

Irish-born in 1841, ­Montgomery followed his family to Montreal at 4, and then, in 1856, to a farm 6 miles east of St. Peter, Minn. He witnessed the largest mass execution in U.S. history when 38 Dakota were hanged in Mankato during his stint as a corporal during the U.S.-Dakota War. Then he headed south to the Civil War, where he served as an officer of black troops. He just turned 24 when history delivered that one-two punch.

"We received the glorious intelligence of the collapse of the rebellion" and Gen. Robert E. Lee's surrender, Montgomery wrote in a handwritten autobiography.

"But scarcely had the thunderous salute of the cannon and the joyful acclamation of the loyal Union multitudes ceased," when he noticed that flag signaling "some serious calamity."

President Abraham Lincoln had been assassinated.

"My heart grieves at every mention of the atrocious deed," Montgomery wrote in a letter to his brother, Alexander. "Freedom has lost a champion: the oppressed their truest friend."

Montgomery's assassination letter is No. 100 of more than 150 that have not only been preserved but digitized on the Minnesota Historical Society's website. Along with that partial 1876 autobiography, they provide a trove of firsthand glimpses and an easy-to-plunge-into rabbit hole for Civil War aficionados at tinyurl.com/MontgomeryArchives.

"Great changes will sometimes occur in a man's life and undoubtedly it has in this instance of mine," Montgomery wrote to his family in 1864 after leaving his Minnesota company to lead black troops — "those of dusky hue and who all their lives have been slaves, but are now (thanks to the war and Old Abe) free men."

Montgomery's descendants have donated his sword, revolver and cane to the Historical Society's archives. But for me, his words carry more value. Most of his writing was left with his wife, Sarah, who died at 92 in 1940 — more than three decades after Montgomery's death in 1907 at 66.

One of their seven children, retired dentist Charles Montgomery, allowed the Historical Society to copy the letters after her death.

"The material had been in family files and boxes in attics and basements for more than 100 years," said Diane Montgomery Brooks, a descendant who lives in London and helped organize Montgomery's archives. "It seemed important to put it in a place where it could be used by researchers and the broader public."

Her wish is coming true. Montgomery emerges as a memorable character in the 2018 book "The Children of Lincoln" — Augsburg University Prof. William Green's engaging look at "white paternalism and the limits of black opportunity in Minnesota" between 1860-1876.

Montgomery and his fellow white officers who commanded black troops "wrapped themselves in the nobility of leading the struggle to make all men free," Green writes.

"He reflected the transition America was going through with white men especially, led by President Lincoln, being asked to change everything they knew about blacks being inferior to live as equals," Green said in an interview.

After scouring through the letters, Green describes ­Montgomery as a "complicated man filled with ambiguity. He did embrace the "higher angels" of abolitionism, "but at the same time, he reflected the bias of his times."

Some of Montgomery's writing smacks of racism when viewed through today's eyes. He writes that black soldiers "have no tenacity of life whatsoever" and "don't appreciate efforts for their future elevation."

But Montgomery also said "the colored soldiers … beat any white soldier I ever saw," helping him win compliments from superiors for having "the cleanest and most orderly quarter in the Regiment."

Montgomery wanted to help resettle blacks in a colony in southern Minnesota after the war, buying up land after Dakota and Winnebago tribal members were banished after the U.S.-Dakota War. But the idea ultimately fizzled as Minnesota rejected expanding voting rights to blacks in 1865.

During the war, Montgomery dispatched his cook, Elizabeth (Lizzie) Estell — a runaway slave married to one of his soldiers — to care for his ailing mother in Minnesota. He paid her, including travel costs, encouraging his mother to teach her to read and write. After the war, he collected books to jump-start black education, predicting in a letter to his mother that "colored children ... will soon outstrip the white children in general knowledge."

After the war, ­Montgomery moved back to Minnesota, serving on the St. Peter school board before moving to St. Paul in 1891, where he became a two-term alderman and major land developer. The streets Thomas, Charles and Edmund are named after his sons.

Curt Brown's tales about Minnesota's history appear each Sunday. Readers can send him ideas and suggestions at mnhistory@startribune.com. His latest book looks at 1918 Minnesota, when flu, war and fires converged: strib.mn/MN1918.