Luann de Lesseps fans were baffled last week when she announced on the “Real Housewives of New York City” reunion special that she was set to appear in “Chicago” on Broadway — only for the musical and her own rep to say the next day that there were not, in fact, any plans for her to join the cast.

Now Page Six has learned how the apparent gaffe came about.

It turns out that the reality star and cabaret artiste was indeed offered a role in the long-running musical, but the whole thing had fallen apart by the time her announcement aired.

We’ve seen a letter dated May 15 from the show’s general manager, B.J. Holt, to de Lesseps’ agent, making an offer for her “to play the role of ‘Mama Morton’ in the Broadway production of the musical CHICAGO subject to a successful vocal work session with the production’s creative team.”

The letter also listed ballpark dates for her first rehearsal and first performance, plus her salary and other details.

In an internal email, her agent also said he was “knee deep in negotiations” about the part when the reunion episode taped May 17, and, at that point, “the deal was firmly and very much alive.”

We’re told that the Countess — who has wanted to appear in “Chicago” for nearly a decade — completed her “vocal work session” as stipulated and went ahead with a few rehearsals.

But according to a source close to de Lesseps, at a meeting with the production on July 6, she discovered that she’d have to commit more time to rehearsals and coaching, even while performing as Mama Morton — and her team decided that between her cabaret show, work for “Real Housewives” and other business commitments, she wasn’t going to be able to take on the role in “Chicago.”

And by the time the reunion special actually aired Thursday, her claim that she was set to appear in the show was no longer correct.

Reps for “Chicago” and Bravo didn’t get back to us.

De Lesseps’ rep declined to comment.