Midway through the Civil War, Harriet Tubman made a gutsy decision: She’d serve the Union Army on a raid up South Carolina’s Combahee River, providing intelligence to commanders in person that she had gathered about the location of Confederate mines and other threats.

The June 2, 1863, military operation is an often overlooked detail about the life of Tubman, an abolitionist who is best known for her role as a conductor on the Underground Railroad that freed tens of thousands of slaves from America’s South during the 1800s. But with the Treasury Department set to announce Wednesday that Tubman will replace President Andrew Jackson on the front of the $20 bill, it’s noteworthy that her legacy extends beyond her extensive contributions to the abolition movement and into her work as a Union spy who oversaw a Special Operations unit of sorts, according to numerous accounts, including one by the U.S. Army.

Tubman’s work for the Union Army began after Massachusetts Gov. John A. Andrew, an abolitionist, reached out to Tubman for help in working with slaves owned by plantation owners who had fled the South in the face of potential bloodshed. The slaves often sought help at Union military camps, putting a burden on Army units that already were in difficult combat conditions.

Here's the new plan for the $20, $10 and $5 bills (Gillian Brockell/The Washington Post)

The governor sent Tubman to Maj. Gen. David Hunter, a Union Commander in South Carolina, who issued her a pass in February 1863 that ordered his troops to provide her with transportation as needed, according to the book “Harriet Tubman: The Moses of Her People,” which was first published in 1869.

“Harriet was sent to me from Boston by Governor Andrew, and is a valuable woman,” the general’s pass read, in part. “She has permission, as a servant of the Government, to purchase such provisions from the Commissary as she may need.””

According to the Army’s account, Tubman established a nine-man spy unit comprising local black riverboat pilots who knew the waterways well and taught them how to collect intelligence. They scouted for the Union, mapping the islands and shores of South Carolina and providing information about the location of Confederate sentinels.

Tubman also is credited with helping to establish the 2nd South Carolina Volunteer Infantry Regiment, which was led by Col. James Montgomery. He would go on to order the controversial June 11, 1863, looting and burning of Darien, Ga., that is depicted in the 1989 movie “Glory,” starring Matthew Broderick and Denzel Washington. Before that, however, came the daring raid up the Combahee River between South Carolina’s Beaufort and Colleton counties.

According to the Army account, Montgomery asked Tubman to lead several gunboats up the river, and she agreed as long as he commanded the operation. She determined the location of mines in the river by sailing up the river ahead of time with members of her team and meeting with slaves who had placed the ordnance. She offered a chance at freedom — and in at least some cases, cash — in exchange for the information.

Two Union gunboats, the Harriet A. Weed and the John Adams, eventually made their way up the river with raiders seizing food and other supplies that Tubman had mapped ahead of time. They freed more than 700 slaves, according to most historic accounts.

A history of the raid published three years ago by the New York Times suggests that about 100 of those slaves eventually joined the Union Army — fewer than Union commanders had hoped, but still inspiring at the time. Tubman continued to serve in the military for at least another year, working as a nurse and continuing to communicate with South Carolinians who could provide information.

Tubman’s clandestine past in the Union military, meanwhile, gets passing mention on occasion. Last fall, it was featured on Comedy Central’s “Drunk History,” which referred to her as a “superspy.” A bridge over the Combahee River was named after her in 2008.