Saturday's visit was only the second by an Iranian president since the 1979 Islamic revolution,
Ahmadinejad accused the US, which suspects Iran of seeking to develop nuclear weapons, of "contriving crises" in the region, saying that Washington was "unhappy with the progress made in the Iranian nuclear file."
The president, whose country insists its atomic programme is purely a civilian one, said:
"Iran doesn't expect any military escalation in the region."
On Saturday, Bahrain and Iran signed a memorandum of understanding related to oil and gas.
Abdul Hussein Mirza, Bahrain's oil and gas minister, said the agreement provides for the future supply of 28 million cubic metres per day of Iranian natural gas to Bahrain.
Mirza said negotiations about the supply of the gas should be completed within a year and it would take three years to build the pipelines to transport it.
Strait of Hormuz
Ties between the two countries have been strained most notably in July when an Iranian newspaper article claimed Bahrain belonged to Iran.
Manouchehr Mottaki, Iran's foreign minister, flew to Manama to defuse the crisis.
Ahmadinejad said he was unaware of a recent statement by a top general in Iran's Revolutionary Guards, who warned his forces were ready "if necessary" to carry out suicide operations in the Gulf in response to any US strike.
He said: "I personally did not hear this statement," according to an Arabic translation of his remarks in Farsi, following talks with Bahrain's king.
Sunni Muslim-ruled Bahrain has a Shia majority, the same branch of Islam that dominates in Iran.
The Gulf country is also home to the US Fifth Fleet, tasked with securing the Strait of Hormuz, through which much of the world's oil supplies must pass.
Following the visit Ahmadinejad flew to Saudi Arabia to attend a rare summit of the Opec group.