TEHRAN — Iran successfully launched a missile into space on Thursday, state media reported, two days after the United States House of Representatives approved a bill that would impose additional sanctions against the country, and Russia and North Korea.

Such tests of what are essentially carrier rockets are not prohibited under the landmark 2015 nuclear agreement between Iran and a group of six world powers including the United States. That agreement eased existing economic sanctions on Iran in exchange for the country’s verifiable promises to restrict its nuclear program to peaceful purposes.

President Trump has called the 2015 agreement a “very bad deal” for the United States and a disastrous giveaway to Iran. He suggested during the presidential campaign that he would end the deal. But the other parties to the agreement — Britain, China, France, Germany and Russia — do not share Mr. Trump’s objections, and a withdrawal by the Trump administration would leave the United States isolated on the issue.

The International Atomic Energy Agency of the United Nations has repeatedly found Iran to be in compliance with the agreement, despite Mr. Trump’s assertions that it is not adhering to “the spirit” of the deal. His administration is now pushing for inspections of suspicious Iranian military sites in an effort to test the strength of the deal, which Iran has repeatedly said it is following. In June, it launched six missiles aimed at what it said were Islamic State terrorists in Syria.