WASHINGTON — Speaker Nancy Pelosi has been playing a very hot hand lately.

Her party won big in the midterm elections, she lined up the votes she needed to take back the speaker's gavel earlier this month and her approval ratings have been on the rise as she has battled President Donald Trump over his promised border wall and a partial government shutdown.

On Wednesday, with her caucus unified behind her in that fight, she pushed a few more chips to the middle of the table by telling Trump he's not welcome to give his annual State of the Union address in the House on Jan. 29, as planned. Instead, she said in a letter to the president, he could submit it in writing, or wait until the government reopens.

While it remains to be seen whether Trump will end up delivering the speech that day, Democrats say they weren't looking forward to giving the president a platform to lecture them in person about building a border wall on national television.

Ben LaBolt, a Democratic strategist and former Obama White House press aide, said Pelosi "has little to lose" with this gambit.

"After wasting an Oval Office address that did little to move the needle, Trump’s only hope is for a big bully pulpit moment, and Pelosi would do nothing but alienate her base by granting him such an opportunity," LaBolt said. "This is a much better strategy than a dual-headed podium response to a SOTU."

But some Democrats and Republicans say there's a risk she could play into Trump's hands.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Most Americans don't pay attention to the daily twists and turns of Washington politics, but they are aware of the president's annual public assessment of the state of the nation — which would be delivered this year at a time when the government may not be fully operational.

Some Democrats worry that Trump will turn the policy fight into a tit-for-tat over the State of the Union. One Democratic strategist who spoke on the condition of anonymity to avoid angering fellow Democrats predicted Trump would do just that, saying the battle over the speech "is not necessarily the fight we want to get in."

Pelosi, who insisted she wasn't actually dis-inviting Trump, cited security concerns because the Secret Service operates out of the Department of Homeland Security, which is one of the agencies affected by the shutdown.

But "essential employees" at DHS are still working — and that definitely includes the Secret Service.

"The Secret Service will not allow the government shutdown to affect its operational duties,” one former high-ranking Secret Service official told NBC News Tuesday.

"The Department of Homeland Security and the US Secret Service are fully prepared to support and secure the State of the Union," Department of Homeland Security Secretary Kristjen Nielsen tweeted. "We thank the Service for their mission focus and dedication and for all they do each day to secure our homeland."

The agency protected the president on a visit to the U.S.-Mexico border just last week, and the protocol for the State of the Union address, held at a building in which the Secret Service operates with some frequency, is pretty well worked out at this point.

"It is not a security issue, that’s politics and you know it," House Minority Leader Kevin McCarthy, R-Calif., said. "For her to say security ... there is no security issue, it is pure politics and it’s wrong."

So far, Democrats have been pleased with Pelosi's handling of the impasse. There's virtually no support for the wall among Democratic voters, and her caucus has been unusually unified in its unwillingness to negotiate with Trump while part of the government is shut down.

After one group of moderates boycotted a lunch meeting with Trump Tuesday, a second set went to the White House but said they attended to deliver the message to Trump that they wouldn't work with him until he reopens federal agencies.

Still, there are divergent views on the best way to go about dealing with the State of the Union.

"The more Trump talks, the more he hurts himself," said Democratic strategist Chris Kofinis. "So I would give him 12 hours" for the State of the Union.

Though Democrats want to call attention to any pain caused by the government shutdown — a small majority of Americans blame the president and Republicans in Congress, while only about a third blame Democrats in recent polls — using the State of the Union address as a leverage point could give Trump another opportunity to try to shift the dynamics of the fight.

"I think there's a risk," said Michael Steel, who served as an aide to then-Speaker John Boehner, R-Ohio. "If he goes to the border, if he stages a big rally that’s well-attended and enthusiastic and talks about the importance of border security, it’s absolutely possible that Washington Democrats will have overplayed their hand and weakened their position in this shutdown fight."

In recent months, the smart money has been on Pelosi having a winning strategy. The question now is whether she's given Trump an opening to slow her hot streak.