Hassan Rouhani made the promise in an address to a parade of armed forces in the capital Tehran, state media reported.
He also said Iran would not seek permission from any country to “defend” it self.
His comments follows Mr Trump’s provocative address at the UN General Assembly – in which he verbally attacked Iran and North Korea.
Mr Rouhani said: “We will increase our military power as a deterrent.
“We will strengthen our missile capabilities … We will not seek permission from anyone to defend our country.”

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.
The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.
Iran’s Tasnim news agency reported the country had unveiled a new ballistic missile with range of 2,000 km (1,200 miles), capable of carrying several warheads.
The report, which gave few other details, quoted the head of the Revolutionary Guards’ aerospace division, Amirali Hajizadeh, speaking on the sidelines of a military parade in Tehran.
During his first address to the UN Tuesday, Mr Trump branded Iran a “murderous regime” and said the 2015 nuclear deal with the country was an “embarrassment”.
He hinted the US would withdraw from the deal he described as “one of the worst and most one-sided transactions the United States has ever entered to”.
The 2015 agreement limits Iran’s nuclear development capabilities in return for softened economic sanctions.
But Mr Trump said Washington could not abide by a deal “if it provides cover for the eventual construction of a nuclear problem”.
Mr Rouhani responded to Mr Trump’s threats, saying the US would pay a “high price” should it decide to terminate the deal.
He said: “Exiting such an agreement would carry a high cost for the United States of America, and I do not believe Americans would be willing to pay such a high cost for something that will be useless for them.
“It will be a great pity if this agreement were to be destroyed by ‘rogue’ newcomers to the world of politics: the world will have lost a great opportunity.”
In his address, Mr Trump also described Iran as a “corrupt dictatorship” and accused the country of exporting “violence, bloodshed and chaos” throughout the Middle East.
On Thursday, Iran’s Foreign Minister Mohammad Javad Zarif rejected any new negotiation with the US over extending the length or conditions of the 2015 deal.
Mr Zarif dismissed the Trump administration as “seriously ill-informed” about the agreement and branded Mr Trump’s UN speech as “absurd”.