JESSICA LANGE almost had an unexpected going away present from “American Horror Story” – an on-screen reunion with her ex-lover Sam Shepard!

Sources toldl The ENQUIRER that “AHS” producer Ryan Murphy wanted to bring the playwright/actor onboard for the hit FX show’s fourth season this fall, which Jessica has said will be her last.

“Jessica isn’t thrilled about it,” a source revealed.

“When she and Sam parted ways she thought she’d never have to deal with him again, but Ryan loves to stir the pot.

“He thinks it will make must-watch TV to have the pair sparring on camera.”

Jessica, 64, and Sam, 70, were together for nearly 30 years before their 2010 split. While never married, the pair had two children, Hannah, 28, and Samuel, 26.

“They didn’t have a friendly break­up,” noted another insider. “Having to see him every day on the set will be awkward for her, to say the least.”

Sam, however, is said to be jumping at the chance to join the show, which tells a completely different horror tale each season with several of the same cast members playing different roles.

“When Ryan contacted him, Sam asked if he had talked to Jessica about his plans. Ryan admitted he hadn’t,” said the source. “Ryan feels he gets the best performances from his actors if he keeps them off guard…but this was a doozy for Jessica.”

The two-time Oscar winner learned about Sam potentially joining “AHS” from their daughter. D

The insider said Jessica – who earned an Emmy in 2012 for her role as eccentric “murder house” neighbor Constance Langdon – would still soldier on for the sake of the show if producers had their way.

Added the insider: “Jessica feels she owes it to the show to stay on for one more season, and not back out just because Sam is joining the cast.”