BAGHDAD, Iraq (CNN) - U.S. Defense Secretary Robert Gates arrived in Iraq on Thursday after ending a two-day trip to Afghanistan.
He was expected to meet with Iraqi leaders, including Prime Minister Nuri al-Maliki and President Jalal Talabani.
Gates also is expected to offer condolences in the Tuesday bombings that killed nearly 130 people, according to Pentagon spokesman Geoff Morrell.
In Afghanistan, Gates told Afghan soldiers that America will maintain a presence in the war-ravaged nation beyond the troop pullout set to begin in 2011.
"While we hope to transfer power in July 2011, we will have a large number of forces here for some time beyond that," Gates told the group at Kabul airport. "This is the first time in Afghan history when foreign forces are here to help, and we intend to be your partner for a long time."
Gates called the relationship between the two countries one "forged in blood" because of the heavy casualties that American and Afghan troops have suffered while battling a resurgent Taliban.
"We recognize your challenges," he said. "Our troops have made sacrifices also. So this is a relationship forged in blood. We will see it through together."
Afghan officials thanked Gates for U.S. President Barack Obama's new plan for Afghanistan, which involves the deployment of an additional 30,000 U.S. troops.
They also expressed relief over Gates' pledge for troops to stay beyond 2011.