BEIRUT (Reuters) - Iran’s defense capabilities are not negotiable, Supreme Leader Ayatollah Ali Khamenei said Wednesday in remarks made previously but which now come amid increased pressure from the U.S. government over Tehran’s ballistic missile program.

Ties between Iran and the United States have deteriorated under U.S. President Donald Trump and suffered another deep blow two weeks ago when he decided not to certify that Tehran is complying with a 2015 nuclear pact and warning he might ultimately terminate it.

Iran has reacted defiantly, dismissing Trump’s demands for the pact to be toughened up. Last week, Iran’s elite Revolutionary Guards, the most powerful military force in the country, said its ballistic missile program would accelerate despite U.S. and European Union pressure to suspend it.

“The defense capabilities and strength of the country are not negotiable or up for haggling,” Khamenei was cited as saying at a ceremony at the Imam Ali army officer’s academy in Tehran, according to state media.

The ramping up of rhetoric on both sides has raised the specter of a possible military confrontation between the two countries. In recent months, small boats from the Revolutionary Guards navy have swarmed close to American warships in the Gulf, prompting the U.S. navy to fire flares and warning shots.

Under the landmark 2015 deal between Iran and world powers, the Islamic Republic agreed to curbs on its nuclear program in exchange for the lifting of a number of sanctions.

The U.S. Senate is considering new legislation which could lead to Washington restoring sanctions on Iran should it test a ballistic missile able to carry a warhead or bar nuclear inspectors from any sites.

In response, Khamenei said last week that Tehran would stick to the nuclear accord with world powers as long as the other signatories respected it, but would “shred” the deal if Washington pulled out.