The friendship between Mary Todd Lincoln and Elizabeth Keckly had long been tucked into the margins of history — evident only among students on a term-paper quest. In the past year, though, the two confidantes have been introduced to the broader public. Christopher Hampton’s play “Appomattox,” which ran last fall at the Guthrie Theater, and Stephen Spielberg’s movie “Lincoln” both devote attention to a fraught relationship curious for its social implications and tragic for its outcome.

“Mary T. & Lizzy K.” takes the story a giant leap forward. The play by Tazewell Thompson, which opens Friday at Park Square Theatre, focuses on two days in the lives of these women. One date is historical, the other fanciful. Thompson directed the world premiere last spring at Arena Stage in Washington, D.C., and agreed to let Park Square’s Richard Cook have the second swing at it. Park Square produced Thompson’s “Constant Star,” about Ida B. Wells, in 2006. Cook’s production of this play features Linda Kelsey as Mary and Shá Cage as Lizzy. Stephen d’Ambrose portrays Abraham Lincoln.

Keckly was born into slavery, bought freedom for herself and her son and eventually translated her dressmaking skill into a position as Mary Lincoln’s modiste. The first lady was a clotheshorse, so Keckly became an important part of the Lincoln family’s inner circle. The bond extended further. Both women had lost sons, and Keckly’s personal attributes of perseverance and hard work provided ballast against Lincoln’s instability.

“They are kind of in the air right now,” Cook said of the rise in public awareness of Mrs. Lincoln and Keckly. “The relationship was clearly unique and historically multidimensional. These women went out to hospitals to visit wounded soldiers, they’d take letters from the men to their loved ones, they traveled together on shopping trips.”

Thompson’s play switches between the day the president was shot, and a fictional day in 1875 in which Keckly visits Mary in an asylum. It is historical that Lincoln was institutionalized for her mental state, but her friendship with Keckly had ended several years earlier.

A sad story

Mary Todd Lincoln is likely the most tragic first lady in American history. The battlefield was never very far from Washington, and her husband had to devote most of his energies to prosecuting the war, preserving the union and leading the nation away from slavery. She likely lived with a bipolar personality, and lost two sons to disease at young ages — Eddie and Willie. In 1865, the man she loved was killed. In her grief, she was ushered out of Washington to fend for herself.

She had to fight with Congress for a small annual pension (about $50,000 in current dollars) and drifted among several residences. Another son, Tad, died in 1871 and her lone remaining offspring, Robert, had her committed in 1875 because he feared for her state of mind. The two did not reconcile until she was near death in 1879.

Because of her prickly personality, Mary Todd Lincoln was not easily adored even after the president’s death. Kelsey said she is hoping to stay true to history but bring a measure of sympathy to her portrayal.

“I’m trying to find her vulnerability as much as possible, because otherwise she can be very unpleasant,” Kelsey said. “She had jealous fits and would turn on a dime. Even if it’s fun for an actor to let it fly, how does the audience relate to that?”

Good intentions, bad outcome

Ironically, it was Keckly’s instinct to protect her friend that led to their breakup. She stayed with Lincoln following the assassination, and the two sought ways to deal with the debts caused by the former first lady’s extravagant tastes. A sale of some of the dresses Keckly had made turned out to be more an embarrassment than fundraiser. In 1868, the former slave wrote “Behind the Scenes: Or, Thirty Years a Slave and Four Years in the White House.” Her intention was to combat Mary’s bad reputation by delving deeper into their relationship and confidences. She also hoped that book sales would help buoy her friend’s finances.

“It backfired,” Cage said bluntly. “They never spoke again.”

Tell-all books such as Keckly’s were considered extraordinarily bad manners. She lost clientele for her dressmaking business, was shunned by high-society matrons and members of the African-American community.

“One doesn’t share things,” Cage said. “She continued to sew and give classes to young women but she was almost unable to keep her head above water.”

Keckly died in poverty in 1907.

“It’s impossible not to be impressed with her spirit,” Cage said. “She had a pioneering drive and motivation to improve her own life. It made me want to know more about her.”

Cook heard about “Mary T. & Lizzy K.” through Marcia Aubineau, a Park Square patron, and asked Thompson for the rights. Park Square is renting costumes from the original Arena Stage production, including a Victorian gown that is pieced together during the play.

“This subject was fresh to me,” Cook said. “Right away I thought it was the kind of relationship that would make a wonderful play.”