Iran on Tuesday unveiled what it called its most advanced domestically produced jet fighter, spotlighting its military at a time when the Trump administration is trying to corner Tehran economically and militarily.

Iranian President Hassan Rouhani sat in the front seat of the two-seater plane during its unveiling at a defense exhibition in Tehran. In a televised speech, he said the fighter would aid in Iran’s defense, should the country come under attack.

The...