Senior Republicans are warning him away from a national emergency declaration to build a border wall. The top Senate leader is directly rebuking his national ­security policy in Syria and Afghanistan. And Democratic committee chairs are threatening subpoenas for his top officials.

For an administration that had largely been accommodated by Republican lawmakers during its first two years, President Trump is facing an increasingly adversarial Congress eager to assert itself on matters of foreign policy and oversight.

Senate Republicans — fresh off a bruising fight over the longest government shutdown in history — are sending fresh signals of discontent, challenging the administration on foreign policy and imploring it to stay out, for now, of talks to avert another shutdown next month. 

And in the House, where Democrats came into power largely on a promise to serve as a check on the president, several Cabinet secretaries have already declined to testify before committees on contentious topics such as the impact of the shutdown and the administration’s abandoned policy of separating migrant families. 

Now that Speaker Nancy Pelosi (D-Calif.) is leading the House for her third term, she faces a tricky political landscape and a big agenda. (Jenny Starrs/The Washington Post)

In one example, House Homeland Security Committee Chairman Bennie Thompson (D-Miss.) sent a blistering letter this week to Homeland Security Secretary Kirstjen Nielsen for not appearing before the committee to discuss the administration’s border security policies.

“If she says she’s not coming, we’ll subpoena her to the committee,” Thompson said in an interview Wednesday. “We need to hear from her. If border security is important, we need to hear her vision.”

Testimony from top administration officials is just one area where Congress and Trump will clash frequently over the next two years, as the White House braces — and staffs up — for an onslaught of investigations and potential subpoenas from committee chairs hungry to exercise oversight. One powerful chairman, Rep. Elijah E. Cummings (D-Md.), has already launched a probe into what he called “grave breaches” within the security-clearance process at the White House and on Trump’s transition team shortly after his November 2016 victory. 

Democrats tried 17 different times to obtain President Trump’s tax returns over the past two years. Now they may finally get them. (JM Rieger/The Washington Post)

In private, Trump has told aides he wants to take an aggressive posture toward such oversight — including fighting any effort by Congress to obtain his tax returns all the way to the Supreme Court. He has told House Speaker Nancy Pelosi (D-Calif.) that if House Democrats begin investigating his administration, he will not negotiate with her on other issues, according to a White House official and a Democratic aide who heard the comments. 

Yet at the same time, Trump has sought to strike a friendly tone with Pelosi, telling her that she is “great” and “terrific” in a phone call this week and promising to work on infrastructure and prescription drug pricing, according to an aide with direct knowledge of the call. 

For now, the nascent Democratic efforts to exercise oversight have largely been met with resistance.

One Cabinet official — Commerce Secretary Wilbur Ross — is scheduled to appear before a House committee on March 14 to testify about the decision to include a question about citizenship on the 2020 Census. 

But Ross appears to be the exception. In addition to Nielsen, Treasury Secretary Steven Mnuchin and Health and Human Services Secretary Alex Azar have declined invitations to appear before Congress. Azar and Mnuchin have instead offered to send other senior department officials to testify.

A DHS spokesman said Thompson’s initial request for Nielsen to appear Feb. 6 was “unworkable” and the secretary offered alternate dates later in February. But Thompson and a committee spokesman said the alternates were during the week of Feb. 18, when Congress is scheduled to be on recess and out of Washington. 

Thompson said Nielsen has until the end of February to appear voluntarily in front of his committee before he begins considering a subpoena for her testimony. 

Meanwhile, Senate Republicans asserted their independence from Trump on several fronts this week — a notable shift from a conference that spent much of the past two months marching in lockstep with the president in the standoff over a border wall that resulted in a 35-day partial government shutdown.

On Wednesday, some Senate GOP leaders rebutted Trump’s latest criticism of his own intelligence officials, which the president issued in a tweet. 

“I would prefer the president would stay off Twitter,” said Sen. John Thune (S.D.), the chamber’s second-ranking Republican. “And, you know, particularly with regard to these important national security issues where, you know, you’ve got people who are experts and have a background and are professionals.”  

Sen. Roy Blunt (Mo.), another top Republican, said, “This is an intel community that the president has largely put in place. And I have confidence in them. And I think he should, too.” 

Meanwhile, Senate Majority Leader Mitch McConnell (R-Ky.) introduced this week an amendment to Middle East policy legislation that rebuked Trump’s decision to pull back troops from Syria and Afghanistan. 

While there have been some long-standing disagreements between Senate Republicans and the White House on foreign policy, the amendment — coming from the top Republican senator who has worked hand-in-glove with Trump on many shared priorities — was one of the most forceful protests against the president’s foreign policy.

“The United States is engaged in Syria and Afghanistan for a simple reason: Because our enemies are engaged there,” McConnell said Wednesday. “Real dangers to us and to our allies still remain in both these nations. We must continue to confront them.” 

The amendment will come to the Senate floor for a vote on Thursday. If it passes, it would be the first clear rebuke of Trump’s foreign policy in the Senate this year.

Earlier this month, 11 Republicans sided with Democrats to try stopping the administration from lifting sanctions on Russian billionaire Oleg Deripaska, an ally of Russian President Vladi­mir Putin. Behind the scenes, administration aides whipped votes fervently to make sure the push failed. “It would have been an embarrassment,” one administration official said.

In making his case with GOP senators, Mnuchin tried to cast Deripaska as a bad actor but someone who had fulfilled the terms of his sanctions. Mnuchin said if the United States didn’t follow through on lifting terms when the sanctions were met, it would be impossible to get others to follow the requirements.

When it comes to domestic policy, Republican senators are also sending some warning shots in Trump’s direction. Twice in his weekly news conference on Tuesday, McConnell underscored the need to reach an agreement on border security that both averts another shutdown in February and prevents Trump from concluding that he should declare a national emergency.

Sen. John Cornyn (R-Tex.), a top McConnell confidant, said he is opposed to the declaration of a national emergency in part because of the precedent it would set and what it might empower a future Democratic president to do down the line. 

“I think it would be a mistake,” Cornyn said. “There’d be a race to see who could get to the courthouse first to try to get an injunction. So, that means it would be tied up probably for the next couple years, sort of like his travel ban.” 

Two senior GOP aides said Trump and other top officials have continued to float a national emergency declaration to secure money for a border wall — though there is “widespread resistance” to it within the Senate, one of these people said. 

Some Republican senators are urging the president to keep his distance from a 17-member committee tasked with coming up with a border security deal and leave it to lawmakers to haggle over the specifics. Republicans on the bipartisan committee were slated to go to the White House later this week for discussions on averting a shutdown, although that meeting appears to have been called off. 

“Let us do our work,” said Sen. Mike Rounds (R-S.D.). “Let the committee work through their process. You know, the president’s made his position clear.”

There could be further scrutiny from the GOP-led Senate in the coming weeks and months as they take up confirmations for key Cabinet posts. One particular nominee who is likely to undergo rigorous questioning from Republicans is whoever is selected to replace former defense secretary Jim Mattis, whose abrupt announcement last month to leave the administration over disagreements with Trump on troop withdrawals and other policy matters alarmed many GOP senators.

“Getting someone through the confirmation process would be more challenging now,” Rounds, a member of the Senate Armed Services Committee, said of Mattis’s successor. “They’re going to ask questions, and they’re going to want good answers about independence and about whether or not they feel comfortable in sharing good information with the president and how they would respond.”

Mike DeBonis contributed to this report.