A photo of an unidentified soldiers in Union uniforms was spotted on Facebook by a high school teacher in New York who had seen a copy with identifying information in a local library. (Courtesy of Library of Congress Prints and Photographs Division)

The 26 Union soldiers were posed for the camera somewhere near Brandy Station, Va., in late 1863 or early 1864.

The front rank stood at parade rest, hands clasped around muskets. The rear ranks stood so their faces could be seen. They were serious young men approaching the final, bloody months of the Civil War.

The Library of Congress, which owns the rare tintype, had described it as an “unidentified company of soldiers” — anonymous Yankees whose stories and fates seemed forgotten. But last month, a New York high school teacher spotted the photo on a Civil War Facebook page and recognized the image. Now the library, which has a digital version on its Web site, has names and stories to go with the faces.

“Often, the pictures are powerful,” said Helena Zinkham, chief for the library’s prints and photographs division. “But having the biographical narrative so enriches the meaning of the moment.

“Who was just new to the company?” she asked. “Who was just leaving? Who might die later?”

The photograph depicts men of Company H, of the 124th New York infantry, nicknamed “the Orange Blossoms” because many were from Orange County. The outfit had already lost its colonel and many of its men in the war.

“Each individual person had a fate and a story,” Zinkham said.

Two of the men in the photograph would later be killed in combat. Another man would be captured and die in the notorious Andersonville prison camp. And another would live to get the Medal of Honor and become a member of Congress.

The picture, an unusual outdoor group photograph, is one of 1,200 Civil War images donated to the library in recent years by McLean collector Tom Liljenquist.

Liljenquist bought it for $3,500 four years ago at a collectors’ show in Gettysburg and gave it to the library in 2010.

“It’s a magnificent photograph, a very rare half-plate tin type, in its beautiful original folding case,” Liljenquist said Wednesday.

A tintype is a photograph printed on a thin sheet of metal, and half-plate refers to the picture’s relatively large size, he said.

But when Liljenquist bought it there was no accompanying identification. He said such cased original photographs, especially outdoor shots, rarely come down through history with detailed information .

“Now, it’s just incredible that we have these guys identified,” he said.

Last month, Garry E. Adelman, vice president of the Center for Civil War Photography, posted a copy of the photo on his Civil War Facebook page to see if anybody had any knowledge about it.

“I had no real hope of identifying the thing,” he said Wednesday.

But when Ryan McIntyre, a high school social studies teacher in Ellenville, N.Y., visited Adelman’s page recently he recognized the picture.

“I looked at it and I said, ‘I’ve seen this picture before,’ ” McIntyre said in a telephone interview Wednesday. He had seen a copy in the holdings of the Historical Society of Walden & the Wallkill Valley, in Orange County.

“It was like an ‘Aha!’ moment,” he said.

McIntyre said the copy in the historical society has a note with it written in 1910 by Lt. John R. Hays, who appears in the photo, identifying many of the men. Hays, who was in his 20s when the photo was taken, was probably about 70 in 1910.

McIntyre said the picture and the information about the men also appear in a 2012 history of the regiment by Charles J. LaRocca, who credits the historical society for the picture and the identities.

Adelman noted: “Having it in a book identified is one thing. Having it [identified] on the Library of Congress catalog, where everybody can see the high-res version, is another.”

The men of the company had probably been in the relative comfort of winter quarters, McIntyre said. They appear healthy and well fed, if a little rumpled. “This is not a company that has been on the road,” he said.

They are flanked on the right by their captain, David Crist, who was then about 47. He would be killed May 30, 1864, in fighting at Totopotomoy Creek, outside Richmond, according to information gathered by Adelman and McIntyre.

Another officer later described Crist as “a kind friend, a noble soldier, and a man whose whole soul was wrapped up in his country’s cause,” according to an 1870s history of the regiment.

Standing near Crist is British-born Sgt. Thomas Bradley, who many years after the war would be awarded the Medal of Honor for fetching ammunition under heavy fire at the Battle of Chancellorsville in 1863.

Bradley went on to serve as a U.S. Congressman for 10 years.

Near him stands James Crist, about 28, who was wounded and captured at Totopotomoy Creek, and died Nov. 11, 1864, in the Andersonville prison camp. It’s not clear how, or if, the Crists were related.

Another doomed soldier in the photograph, standing near James Crist, is Chester Judson, about 18. Judson would be killed by a rebel sniper Sept. 14, 1864, in the trench warfare around Petersburg.

He was shot in the head during the day while at his picket post, but a comrade had to wait until dark to drag his body back into Union territory.

“We buried him by moonlight, and it was a most solemn scene,” an officer recounted later. “We wrapped him in his blanket, and placed him in a cracker box coffin. A prayer was offered at his grave which was dug and filled in by the chief mourners, and I reported one less man for duty.”