U.N. Ambassador Nikki Haley’s surprise announcement to resign by the end of the year sent shock waves across Washington’s foreign policy landscape Tuesday, triggering speculation that President Trump is gearing up for a new hard-line shift on international affairs as he heads toward his third year in office.

With Mr. Trump saying he’ll nominate a successor within three weeks, foreign diplomats are already speculating that the president is bent on naming someone who’ll take his “America First” agenda toward the United Nations to heights even Ms. Haley may have balked at during her run as ambassador over the past 20 months.

“A lot of U.N. officials and foreign diplomats will fret that Trump will select a much more hard-line unilateralist to replace Haley,” said Richard Gowan, a Columbia University professor and expert on U.N. politics.

Others say Mr. Trump, who claimed Tuesday to have known for months of Ms. Haley’s intention to leave the post by the end of 2018, decided suddenly to fast-track her resignation to ensure a successor can be confirmed quickly by the Republican-controlled Senate ahead of a difficult and uncertain midterm vote next month.

“This administration is all politics all the time, so it wouldn’t surprise me that they wanted to get ahead of the election,” said Gordon Adams, a long-time foreign policy commentator who teaches at American University. While Mr. Adams added that “it’s not clear at all why [Ms. Haley] resigned” and “it’s almost impossible to read meaning into it,” there were signs Tuesday that Democrats are already gearing up to make life difficult for whomever Mr. Trumpnominates to the post.

New Jersey Sen. Bob Menendez, the ranking Democrat on the Senate Foreign Relations Committee who could wield the panel gavel with a huge Democratic wave in November, said Tuesday Ms. Haley’s surprise resignation was a “sign of the Trump administration’s chaotic foreign policy,” adding that he’s “deeply concerned about the leadership vacuum she leaves and the national security impact of her departure at this time of continued disarray for this administration.”