Iowa Republican Senate candidate Joni Ernst said Friday that she would have supported a continued U.S. troop presence in Iraq, rather than completely leaving the country.

"What we see going on in Iraq right now, if this current administration had followed guidance from military leaders many years ago, we would not be in this situation," the Iraq veteran said in an interview with ABC News.

"What I would have supported is leaving additional troops in Iraq longer, and perhaps we wouldn’t have this situation today," Ernst said.

Her comments come as the United States conducts airstrikes against Islamic State militants outside of the Kurdish city of Irbil, where U.S. personnel, including an American consulate, are stationed.

President Barack Obama responded to criticism of his Iraq policies on Saturday by arguing that a majority of Iraqis didn't want continued U.S. troop presence in the country, and that he was obligated to abide by Iraq's wishes as a sovereign nation.

"That entire analysis is bogus and wrong but frequently gets peddled around here," he said in a statement from the White House, responding to the idea that the U.S. should have stayed in the now-embattled nation.

Obama added that the current situation would be worse if U.S. troops had indeed remained in Iraq. "We'd have a much bigger job," he said.

Discussions about extending the U.S.–Iraq Status of Forces Agreement fell apart in 2011 after Iraq's government adamantly refused to give U.S. troops immunity from prosecution in Iraqi courts, as American negotiators demanded.