'Western powers have two choices. Confrontation will result in defeat. We suggest that in the forthcoming Istanbul meetings confrontation be replaced with cooperation,' he said.
Ahmadinejad attended the 11th summit of the 10-member Economic Cooperation Organisation (ECO) and also had a bilateral meeting with Turkish President Abdullah Gul.
At a press conference following the meetings, Ahmadinejad strongly defended Iran's nuclear programme and said that Western powers had 'failed to prevent Iran from gaining access to nuclear energy.' He also asserted that sanctions would not change Iran's policies.
'The sanctions will have no effect on our decision-making process. They will fail because we are self-reliant and not dependent on the EU or US,' he said.
During his Istanbul visit, Ahmadinejad thanked Turkey for offering to host the upcoming talks, saying its presence at the talks was 'very important.' He did not, however, suggest that Turkey take a mediating role in the negotiations.
Turkey has sought to increase its involvement on the issue of Iran's nuclear programme.
In May, it joined Brazil in brokering a deal to swap Iranian uranium in Turkey for fuel for a Tehran medical reactor.
But Western powers rejected the arrangement as insufficient to prevent Iran from developing nuclear weapons and applied sanctions to Iran starting in June.
Turkey had also hoped to host the talks between Iran and the '5+1' countries that took place in December, but they were held in Geneva instead. Those talks achieved little more than an agreement to hold another round of negotiations in Istanbul in late January.
Turkey has said that it will merely act as a host of the January meetings, unless called upon to help as a mediator.
In addition to Ahmadinejad, the ECO summit drew heads of state from Pakistan, Afghanistan and several Central Asian nations, as well as Iraqi President Jalal Talabani, who participated as a guest.
Gul is scheduled to hold a trilateral meeting on Friday with Afghan President Hamid Karzai and Pakistani President Asif Ali Zardari to discuss security issues.
Although the summit itself produced few tangible results, it demonstrates Turkey's interest in expanding its influence in the Middle East and Central Asia.
Gul on Thursday took over the rotating chairmanship of the ECO from Ahmadinejad. In his opening speech, he said Turkey is committed to helping other member countries reach the United Nations' Millennium Development Goals and to working together to confront regional security issues.
'Being located at the centre of Eurasia, Turkey attaches great importance to peace, security, stability and prosperity in the region. Accordingly, we are working to establish regional dialogue and develop comprehensive regional economic cooperation projects for energy, communications and transport,' Gul said.
Building on its strong cultural ties with other ECO members, Turkey hopes to increase its political and economic influence in the region, which is rich in oil, natural gas and other assets, but beset with challenges such as political instability and terrorism.
The ECO countries have a combined population of 400 million, approximately four-fifths that of the European Union.
Istanbul - DPA