TEHRAN — Flush from his decisive re-election victory, Iran’s president struck back on Monday after a weekend of verbal affronts from the Saudi-American summit meeting, describing President Trump’s visit to Riyadh as empty theatrics and mocking his support for a monarchy that has “never seen a ballot box.”

At a news conference in Tehran, President Hassan Rouhani, a moderate cleric who has sought to open up Iran, said his victory on Friday over a hard-line conservative challenger showed that Iranians had exercised a democratic choice.

Mr. Rouhani suggested that he remained open to dialogue with the United States. But he did not waste the opportunity to exploit the contrasting optics created by Mr. Trump’s visit with Saudi Arabia’s ruling monarchs at the moment Mr. Rouhani’s victory was confirmed.

“Mr. Trump arrived in the region at the time when he saw 45 million Iranians participating in the elections,” Mr. Rouhani said. “Then he visited a country that I doubt knows the definition of elections. The poor things have never seen a ballot box.”