WASHINGTON — Hawkish Republican lawmakers, still reeling from President Trump’s decision on Wednesday to yank American forces from Syria, found fresh cause for alarm on Thursday, after Defense Secretary Jim Mattis resigned in protest and reports circulated that the president was preparing to pull thousands of troops out of Afghanistan.

Coming on the same day that Mr. Trump balked at an agreement to avert an imminent government shutdown, the rapid-fire developments prompted rare warnings from within Mr. Trump’s own party that his foreign policy could be leading toward dangerous instability on the global stage.

In perhaps the most surprising response, Senator Mitch McConnell of Kentucky, the usually circumspect majority leader, issued a cutting and lengthy statement, saying: “It’s essential that the United States maintain and strengthen the post-World War II alliances that have been carefully built by leaders in both parties. We must also maintain a cleareyed understanding of our friends and foes, and recognize that nations like Russia are among the latter.”

He continued: “So I was sorry to learn that Secretary Mattis, who shares those clear principles, will soon depart the administration. But I am particularly distressed that he is resigning due to sharp differences with the president on these and other key aspects of America’s global leadership.”