SPOILER ALERT: This post contains spoilers for the fifth episode of Season 4 of The Gilded Age.

Agnes van Rhijn, played by Christine Baranski, gets the better of Bertha Russell, played by Carrie Coon, during a high-stakes dinner for President Grover Cleveland in the fifth episode of The Gilded Age’s fourth season.

Agnes was first supposed to host Cleveland (Jim Gaffigan) at her home. But after an ambitious reporter published an interview with Agnes in Ladies’ Home Journal and took liberties with the facts, the dinner moved to the Russells’ home, much to Agnes’ chagrin.

The women clashed over details, including which household’s staff would run the event. Chef Borden (Douglas Sills) and the Russell staff initially prevailed with a luxurious menu, while the van Rhijn household planned more traditional dishes.

The Russells’ stove then blew up, forcing the staff to finish cooking at the van Rhijn home. The President turned down dish after dish. Mrs. Bauer (Kristine E. Nielsen), however, had read a recent interview in which Cleveland discussed his favorite foods. She and the van Rhijn staff had prepared simple, familiar dishes as a backup, and those preparations saved the dinner.

“It all came down to ‘good research,’” Coon recently told Deadline, explaining Agnes’ win. “[Christine] is delicious to work with. What I love is that, in the [episodes] leading up to the presidential dinner, Christine Baranski’s character has become a bit unhinged. The stakes are very high for her. She has lost her status. She has lost her wealth. She has lost her position in her own house, and this is her chance to redeem herself, and she’s going about it in an extreme way.”

Series showrunner Sonja Warfield also reflected on Bertha and Agnes’ relationship. She said one of her favorite scenes she wrote this season was at the end of Episode 3, when Agnes leaves the Russell home after learning she had been “taken down by a telephone.”

Mrs. Bauer’s research uncovered that the President’s favorite dish was Irish stew. Bannister (Simon Jones), the van Rhijns’ butler, also had beer ready after Cleveland rejected the wine Bertha had selected to go with the meal. Cleveland was the 22nd — and later 24th — President of the United States.

“When she gets to the dinner, [Agnes is] so composed. She knows exactly what to do. She does undercut Bertha with her special knowledge of the president. Bertha took her eye off the ball,” Coon said. “[Bertha] thought the fanciest, newest thing would be the most impressive, when, in fact, she didn’t know her audience. Even Enid Winterton [Kelley Curran] sidles up to [the president] and is able to rely on her working-class past to charm him.”

Enid is now Mr. Oscar van Rhijn and firmly on Agnes’ side. She is determined to keep climbing the ladder of success, while also taking down her former mistress and employer.

“[Bertha] is humiliated in every single way,” Coon said. “The other delightful part of a scene like that is I was sitting next to Jim Gaffigan and Christine all night long. It was just a delightful place at the table, and I wouldn’t change a thing. For 10 days, I sat next to them while we shot that scene, and I wanted to burn that dress.”

The two households’ staff members had crossed paths before. In Season 2, Bannister wrote a scathing note about Church (Jack Gilpin) coming home drunk, then learned the sad reason and withdrew it. The note could have gotten the Russells’ butler in trouble with George (Morgan Spector).

Warfield said she had written a Season 3 scene in which Bertha and Agnes “read each other for filth,” but Julian [Fellowes] asked her to tone it down because he did not think the characters could recover from it. “I’m really happy he did that because it gave us places to go and room for them to have a bigger clash that had more gravitas to it. I’m grateful that we saved it for Season 4. The presidential dinner came about because one of our producers, Peregrine Fellowes, had an idea to do a bottle episode.”

She added: “Not that Episode 5 is a complete bottle episode, although we did feel like we lived in that dining room —we were filming there forever, for long crazy hours. What was really so much fun about writing this season for Agnes is the highs and the lows, and Christine played the heck out of all of them. A lot of what the whole series has been building to is this clash, a Hatfield and McCoy type of thing.”

Bertha’s worries also extend beyond the dinner. Her husband’s laudanum addiction has affected his usually cordial manner. At the dinner, George confronted J.D. Rockefeller (Neal Huff) in front of their guests. That storyline will continue through the rest of the season, leaving Bertha to focus more on her husband’s needs than her own ambitions.