Baghdad (CNN) -- U.S. Defense Secretary Robert Gates told reporters in Baghdad that his current visit to Iraq will probably be his last.
He has previously announced that he intends to retire sometime this year.
Gates made the comment while speaking to reporters at the U.S. Division-Center headquarters, where he addressed about 200 soldiers from Kansas and Hawaii. He called it "the high point of my trip."
Gates also addressed the possible U.S. government shutdown. He explained that, even if troops didn't get a paycheck due to a government shutdown, they would be paid back.
Differences between U.S. Democrats and Republicans have kept them from reaching agreement on a budget for this year. If there is no deal by midnight Friday, when the current spending authorization measure expires, parts of the government will close down.
"As a historian, it always occurred to me the smart thing for government was always to pay the guys with guns first," he said in response to a query on a shutdown's possible impact.
Earlier Thursday, Gates met with the Commanding General of U.S. Forces in Iraq, General Lloyd Austin, and with the U.S. Ambassador to Iraq, James Jeffrey, at Al Faw Palace in Baghdad.
Later, Gates will meet with Massoud Barzani, president of the Kurdish regional government, said a senior defense official who agreed to talk on background
Gates message to Iraq's leadership will be "that it is important for them to complete the government-formation process, particularly to get the security ministries dealt with," a senior defense official said.
Gates arrived in Baghdad Wednesday night on an unannounced visit.
Prior to touching down in Baghdad, Gates was in Riyadh, Saudi Arabia, for talks with that country's leader, King Abdullah. Like most top-level U.S. visits to regional hot spots, Gates' visit to Iraq was unannounced, most likely for security reasons.
Speaking to reporters after his meeting with the Saudi monarch, Gates said they discussed "developments all over the region" and "obviously they talked about Iran."
He described the talks as an "extremely cordial, warm meeting."
He chided Iran for meddling in the Persian Gulf kingdom of Bahrain, where recent protests led the government to call in troops from member states of the Gulf Cooperation Council.
"We already have evidence that the Iranians are trying to exploit the situation in Bahrain," Gates told reporters Wednesday. "We also have evidence that they are thinking about what they could do to try to create problems elsewhere, as well."