President Donald Trump fired another warning shot at members of his own party on Thursday morning.

In a tweet, the president contended that the hard-line conservative House Freedom Caucus — which helped to defeat the GOP Obamacare replacement bill last week — will "hurt" the Republican agenda "if they don't get on the team." He appeared to threaten electoral backlash, saying "we must fight them" and Democrats in 2018, when the next congressional midterm elections are held.

Trump tweet: The Freedom Caucus will hurt the entire Republican agenda if they don't get on the team, & fast. We must fight them, & Dems, in 2018!

The White House told NBC News the tweet speaks for itself and did not clarify whether Trump was suggesting he would support primary challengers to Freedom Caucus members if they do not back his agenda.

Trump's broadside comes at a fragile time for Republicans, who failed to follow through on a key campaign promise last week despite holding both chambers of Congress and the White House. House GOP leaders failed to gather support from Freedom Caucus members, as well as some key moderate Republicans.

They now face a possible challenge in trying to unify behind a tax reform plan, their next legislative priority, and another possible attempt to repeal the Affordable Care Act.

Asked about Trump's tweet Thursday, House Speaker Paul Ryan said he understood Trump's "frustration" but said he is encouraging House Republicans to try to come to an agreement on health care.

"I understand the president's frustration. I share frustration. ... We're close," Ryan told reporters at a news conference. "What I am encouraging our members to do is keep talking with each other until we can get consensus to pass this bill. But it's very understandable that the president is frustrated, that we haven't gotten to where we need to go."

In the days since the health-care bill's defeat, Trump signaled that he wanted to work with Democrats and holdout members of his party on new legislation that could pass Congress. It is unclear so far if Trump's threats will make Freedom Caucus members more or less likely to fall in line with party leaders.

Trump faces a historically low approval rating for this point in his presidency, and some Democrats see an opportunity to gain congressional seats in 2018 amid backlash to the president.

Rep. Justin Amash of Michigan, a Freedom Caucus member and frequent Trump critic, tweeted that Trump's statement showed it "didn't take long for the swamp to drain" the president, referencing Trump's campaign pledge to "drain" Washington of corruption and petty political battles. Amash said "almost everyone succumbs" to Washington politics.

It didn't take long for the swamp to drain @realDonaldTrump. No shame, Mr. President. Almost everyone succumbs to the D.C. Establishment.

Republican Rep. Thomas Massie of Kentucky hit back at Trump in a tweet, highlighting that the health-care plan only had 17 percent support in a Quinnipiac poll.

@realDonaldTrump it's a swamp not a hot tub. We both came here to drain it. SwampCare polls 17%. sad