Johnson is widely expected to defeat Hunt in the race to become the next Conservative Party leader-and thus prime minister-when the result of the contest is announced on July 23.
"Were I to be prime minister now, would I be supporting military action against Iran?"
Hunt was careful not to give too direct an answer to the question.
"The risk we have is something different, which is an accidental war, because something happens in a very tense and volatile situation", Mr Hunt said.
But Johnson was uncharacteristically frank on the same point, though the former London mayor's reputation for political duplicity suggests he could change his tune once in office. He said the Tehran government is a "disruptive, dangerous, difficult" regime, but military action is not "a sensible option for us in the west".More news: Trump nominates Esper, Spencer temporarily takes over as Pentagon chief
Johnson said the original tweets expressed sentiments "that went out decades and decades ago".
In reaction to the re-imposition of tough USA sanctions, which have notably targeted Iran's main oil revenue stream, Tehran has scaled back on some of its nuclear commitments under the deal, leading the European parties to the pact to warn it about not fully complying with the terms.
But Johnson's comments, ruling out joining any US -led military action, risk undermining Trump's attempts to pressure Iran to rein in its nuclear ambitions and end its destabilizing activities in the region.
Both the US government and Iran have said they are not seeking a war. Tehran is stubbornly resisting White House efforts to get it back to the table to negotiate a more restrictive agreement.
He also said there was still time to save the Iran nuclear deal and that despite the United States being Britain's closest ally it disagreed on how to handle the Iran crisis.More news: American Kills Girlfriend, Shares Images of Her Body on Net
Outraged Iranian leaders called for the vessel's immediate release and threatened retaliation. A British Navy warship last week drove off Iranian patrol boats which were approaching a British tanker as it sailed through the Strait of Hormuz, the latest in a series of military incidents which some believe could lead to all-out war.
Johnson said the tweets were unacceptable.
Last week Kim Darroch, the U.K.'s ambassador to the USA, resigned after Trump reacted angrily to the leaking of confidential cables the diplomat had sent to London criticizing his administration.
Johnson echoed prime minister May, whose spokesman also condemned the tweets earlier on Monday.
He also described Trump's presidency as "dysfunctional", "incompetent", and "inept".More news: Huawei to invest $3.1bn on 5G network development in Italy
Both Johnson and his rival, foreign minister Jeremy Hunt, told a debate on Monday they were not willing to accept the so-called Irish backstop, an insurance policy to prevent the return of a hard border between Northern Ireland and the Irish Republic.
- Colombian caught in Spain with cocaine worth Sh3.5m under wig
- Judge bars Roger Stone from social media
- Trump mulls ousting Commerce Secretary Wilbur Ross
- Federal Judge Curtailed Damages Award Bayer AG by $25.27 Million
- Justice Department won’t charge New York officer in Eric Garner’s death
- 20mn children not vaccinated in 2018: UN warns against 'stagnation'
- Australia to decide on Ashes squad in Southampton trial match
- Kellyanne Conway Defies House Democrats' Subpoena at White House Direction
- Beyoncé Calls 'The Lion King' Album 'A Love Letter To Africa'
- 'The Bachelorette' 2019: Top 3 for Hannah B.'s Season Revealed!