Mr. Pompeo, a former congressman from the Wichita area, has quietly explored a campaign for months. But in the aftermath of the military operation last week that killed Maj. Gen. Qassim Suleimani of Iran, Mr. Pompeo has told senior party officials that he is ruling out becoming a candidate, according to several people who have spoken with him directly.

Mr. Pompeo still has time to change his mind. The filing deadline for the primary is not until June. However, administration officials who have spoken with him in recent days said he seemed adamant about not entering the race.

Without Mr. Pompeo in the race, Republicans face an unsettled primary that includes at least one candidate, Kris Kobach, whom party leaders fear could imperil their hold on a crucial open Senate seat. Mr. Kobach, who ran unsuccessfully for governor in 2018, is popular with hard-right primary voters but widely disliked among moderate and independent voters in Kansas.