UN envoy says elections will be held on October 1.
Iranian leaders were expected in Baghdad this week for talks on the future of Iraq with the United States but reportedly sought a delay.
Ali al-Dabbagh, the government spokesman, said: “The Iranian president will be visiting for two days from March 2. He will be meeting with President Jalal Talabani and with Prime Minister Nuri al-Maliki.”
He said discussions would revolve around “bilateral issues”.
Ahmadinejad’s visit is at the invitation of Talabani, who has been a frequent visitor to Tehran, his most recent trip coming last June.
Al-Maliki made his first official visit to Iran in September 2006 and followed it up with another visit last August.
Some analysts have said the visit would irk Washington, but the White House on Thursday voiced support for the trip, as long as Iran ceased alleged support of violence in Iraq.
Gordon Johndroe, a White House spokesman, said: “We want Iran and Iraq to have good relations. The fastest way for that to happen is for Iran to stop supporting extremists in Iraq who kill innocent Iraqis and Americans.”
Washington accuses Iran of giving weapons and training to Shia militias in Iraq, including armour-piercing bombs known as explosively formed penetrators (EFPs) that have killed hundreds of US troops.
Tehran denies the charges and insists the withdrawal of American troops is the first step towards restoring security there.
The announcement of the date for Ahmadinejad’s visit came hours after Iraqi officials said Iran had postponed talks with the US on improving security in Iraq.
Those talks had been scheduled to take place in Baghdad on Friday.
Iraq’s US-backed government, still dependent on US forces to protect its borders, has said it does not want to be caught in the middle of any conflict between Washington and Tehran.
In 1980, the Iraq-Iran war was triggered by a dispute over the Shatt al-Arab waterway forming their common southern border. It was one of the deadliest conflicts in Middle East history.
A bomb planted in a minibus ripped through a market in Baghdad‘s teeming Sadr City neighbourhood on Thursday, killing five people and wounding 30, a security official said.
The explosion around midday (0900 GMT) came when the market in the mainly-Shia neighbourhood was bustling with people, the official said.
In Saddam Hussein’s native village of Awja in central Iraq, gunmen stormed into a house and shot dead nine members of the executed president’s clan, police said on Thursday.
“Among those killed were men, women and children. They were members of the same family,” a police official said.
“Only an eight-year-old child was left unharmed.”
The attack in Awja, seven kilometres from the city of Tikrit, occurred during the night, the official said, speaking on condition of anonymity.
“The father of the family was a member of (Saddam’s) Bijat clan,” Moussa Faraj, a neighbour, said.
“He had no political ties nor was he a member of the former army. He was a simple businessman.”