One of the bodyguards of the targeted minister Mahdi al-Hafidh was killed but the minister survived the shooting in Baghdad on Wednesday, where a bomber in an explosives-laden garbage truck had earlier killed two policemen.
There was no immediate claim for the assassination bid on the minister.
The garbage truck blast outside a Baghdad hotel earlier on Wednesday, which wounded 30 people, was close to the Agriculture Ministry building.
"Two men, dressed in police uniforms, shouted 'Allahu Akbar' and detonated the garbage truck in a street behind the ministry," a security guard said, declining to give his name.
In police guise
The targeted hotel is near the
Iraqi Agriculture Ministry
Police officer Mazin Hamid said the attackers drove the truck into a car park between Al-Sadir hotel, which has been repeatedly attacked by armed men in the past, and the Ministry of Agriculture.
Police said armed men, some dressed in police uniforms, killed two security guards before the truck bomb attack.
Foreign security officials said other security guards in the area fired on the vehicle, trying to disable it before it exploded.
Casualties were taken to several hospitals.
Ibn al-Nafis Hospital counted at least 27 wounded, according to Dr Fallah al-Juburi.
The massive blast shook buildings in the area and covered a huge swathe of Baghdad's sky with acrid black smoke, much of it coming from the flaming wreckage of the truck and several burning cars.
About 20 vehicles in the car park were damaged.
In front of the hotel, Sabiha Kazar, 40, broke down in tears, worried for her wounded husband and two daughters, who had been taken to the hospital.
"Our home is practically destroyed," she said.
"Two men, dressed in police uniforms, shouted 'Allahu Akbar' and detonated the garbage truck in a street behind the ministry"
The attack began at 6.30am (0330 GMT) when a rocket-propelled grenade was fired from a car at a checkpoint sealing off the main road to the ministry and hotel.
The bodies of 26 people who had been shot to death were found near a village along Iraq's western border with Syria, Aljazeera learned on Wednesday.
The corpses were found on Tuesday in Rumana, about 20km east of the western city of Qaim.
The identities of the victims were not known.
Fifteen bodies - some shot, others beheaded - were found just south of Baghdad, Iraqi army sources said.
The massive blast in Baghdad
shook buildings in the area
In a separate attack in Baghdad, a roadside bomb killed a US soldier on Wednesday and wounded another, the military said.
In the southern city of Basra, a roadside bomb killed one policeman, police said.
Elsewhere in the country, armed men opened fire on a mini-bus of workers employed by a Kuwaiti company, killing one man and wounding three others, police said.
Iraqi journalist Ziyad al-Samarrai confirmed the attack to Aljazeera.
He said two Iraqi engineers working for a Kuwaiti company were killed and another two seriously injured in the Zayyuna neighbourhood in Baghdad when armed men opened fire on them as they headed to work.
He said the director of al-Furat hospital was also killed in al-Jihad quarter in Baghdad.
A car bomb exploded in the Baladiya neighbourhood, but caused only light damage and no casualties.