Gunmen open fire on a senior industry ministry official as he travels through the Gazaliya district in Baghdad, killing him and his driver
Ms Rice said the insurgency could be beaten if Iraqis were offered a "strong political alternative".
There have been a string of attacks in recent weeks
But she said she was concerned that Sunni Muslims were not taking a full part in that process, and had only token representation on a committee set up to draft a new constitution.
Ms Rice added that the security forces in Iraq were "fighting a tough set of terrorists" and that the US military "will remain active in Iraq until Iraq can defend itself".
Addressing a news conference in Baghdad's heavily fortified Green Zone, with Mr Jaafari at her side, Ms Rice expressed support for the new Iraqi government, which was finally formed at the end of April - three months after the election.
"I have great confidence in the leadership that the Iraqi leaders have shown and in the dedication of the Iraqi people", she said.
"It's very hard what the Iraqis are being asked to do, which is cast off years and years of tyranny and dictatorship and come to political unity in what is a very complicated place."
Ms Rice is the first senior US figure to visit Iraq since the government was formed.
It is also her first visit to Iraq since being promoted to secretary of state earlier this year.
To ensure security, Mr Jaafari was only told of the plan on Friday.
Even the pilot flying Ms Rice's plane was not informed who his passenger was until she was safely on board, senior state department adviser Jim Wilkinson said.
Ms Rice's first stop was the city of Irbil in the Kurdish north, where she donned body armour to fly by helicopter for a meeting with Kurdish leader Massoud Barzani.