The speaker of the House, Nancy Pelosi, stands behind President Trump at his State of the Union address on Tuesday night, she a vision in suffragist white, head tilted just so, lips pursed in a smirk and arms outreached.

Her hands come together in what one Twitter user called a “walrus clap,” but it resonated around the world.

In the image, captured by Doug Mills of The New York Times, and in other pool video footage, the internet saw acres of shade dispensed by a skilled politician firmly in control, and social media users immediately turned Ms. Pelosi’s wordless gesture into a viral meme.

Cross-party applause for the president on such a night is normally a pro forma affair, overlooked in the sea of stirring words penned by a speechwriter and recited from a teleprompter.

The talk show host Samantha Bee crowed: “Dude, I know it’s driving you crazy that a woman turned you down, but this is the point in your life where you’re actually going to have to learn that no means no. There will be no grabbing this podium until Nancy is good and ready.”

As the shutdown dragged on to become the longest on record, 35 days, the consensus was that Mr. Trump had met his match in Ms. Pelosi, so much so that a man known for giving foes insulting nicknames like “Cryin’ Chuck” and for labeling women “horseface,” “ugly” and “dog” could come up with only one term to refer to Ms. Pelosi: Nancy.

But Ms. Pelosi’s playbook for handling the president was evident back in December, when she and Senator Chuck Schumer, Democrat of New York, attended a televised Oval Office meeting with the president that went haywire.

In the verbal barrage that followed, the Democrats got Mr. Trump to take ownership of any shutdown that would follow, and Ms. Pelosi snapped: “Mr. President, please don’t characterize the strength that I bring to this meeting as the leader of the House Democrats.”

That round, too, went to Ms. Pelosi, according to political analysts.

Soon afterward, word leaked that in a closed-door meeting with her Democratic colleagues, she had called the wall debate “a manhood thing” for Mr. Trump, likening the meeting to “a tinkle contest with a skunk” and adding, “I was trying to be the mom.”

On Tuesday night, some Twitter users saw echoes of a stern matriarch in Ms. Pelosi’s countenance. She stared at notes in front of her and appeared to roll her eyes and shake her head at some points.

But it was the speaker’s fleeting “bless your heart” expression as Mr. Trump looks back at her — as if for approval — with the clap that had the internet buzzing.