WATCH: Vivek Ramaswamy Rules Out Use of Military Force Against Iran

Presidential candidate Vivek Ramaswamy (R.) said he will not use U.S. military force against Iran, saying that America should not be "sleepwalking" into "wars that we don't belong in."

"I think it's really important that the U.S. not put our own men and women on the line in a war with Iran," Ramaswamy said in an interview this week. He added that the United States should "remain supportive" of our "friend" Israel and be "at Israel's back."

Ramaswamy said he is "anti-war" and wants to end the war in Ukraine, deter China, and prevent Iran from feeling emboldened.

"We will not stop Israel from defending itself to the fullest capacity, and we remain supportive of Israel," Ramaswamy said.

It's the latest isolationist position the candidate, who is now consistently ranking among the top three GOP presidential primary candidates in polls, has taken. The stance would be a departure from U.S. policy toward Iran in recent years, as former presidents Donald Trump and Barack Obama both said the United States is willing to use military force against Iran if it attempts to build nuclear weapons.

Ramaswamy on Monday said he supports a Monroe Doctrine-style foreign policy where the United States defends its superiority in the Western Hemisphere while pulling back its influence elsewhere in the world.

Rival Republican candidate Mike Pence on Wednesday called out Ramaswamy following his comments on Iran for having a "profound lack of understanding about defending American interests."

Ramaswamy has faced criticism in recent weeks for flip-flopping on issues, including on the topic of providing aid to Israel.