Two Australians imprisoned in Iran for flying a drone near a military installation have been freed in an apparent prisoner swap with Tehran.

The Australian government denies a quid pro quo, but the release of Jolie King and Mark Firkin from Evin prison came as an Iranian doctoral student, held in a Brisbane jail and wanted for extradition by the US on sanctions-busting allegations, was freed to go home.

British-Australian King and Australian citizen Firkin were arrested in early July, reportedly for flying a drone – to shoot video for their travel blog – near military installations in Jajrood in Tehran province.

They had left their home in Perth, Western Australia, in 2017, documenting their travels on a blog called The Way Overland. Dozens of videos and photographs posted on YouTube and Instagram appear to have been shot using a drone.

Drone use with a permit is allowed in Iran but there are strict conditions. People must not fly drones over people or large crowds, over the city of Tehran, or over sensitive areas.

Australia’s foreign affairs minister, Marise Payne, said “very sensitive” government negotiations had secured the couple’s release.

“The ordeal they have been through is now over, they are being reunited with their loved ones.”

Payne said King and Firkin were in good health and good spirits, and had requested privacy.

University of Queensland doctoral research student, Reza Dehbashi Kivi, who has been held in a Brisbane jail on sanctions-busting allegations for 13 months, will not be extradited to the US, the Australian government has confirmed.

The 38-year-old was arrested in September last year and accused of conspiring to export restricted American-made amplifiers that could be used to detect stealth planes or missiles to Iran.

The US sought to have him extradited on six charges, including conspiring to export special amplifiers classified on the US munitions list as “defence articles”, and of “aiding and abetting in the exportation of defence articles from the United States to Iran”.

Dehbashi Kivi faced up to 20 years in prison. During a failed application for bail, he told the Brisbane magistrates court he was a PhD student researching the development of a machine to detect skin cancers.

Iranian state media agency Islamic Republic of Iran Broadcasting (Irib) has reported Dehbashi Kivi returned to Tehran on Saturday.

The attorney general, Christian Porter, would not comment on whether King and Firkin were released in exchange for Dehbashi Kivi but said in a statement that “in all the circumstances of this particular case” Dehbashi Kivi should not be extradited.

“My decision was made in accordance with the requirements of Australian domestic legal processes and is completely consistent with the powers provided to the commonwealth attorney-general under our law,” Porter said.

“The Australian government does not comment on the details behind its consideration of particular cases,” he said.

“And while it is likely that because of Mr Dehbashi Kivi’s nationality some will speculate regarding this matter, consistent with prior practice I do not intend to comment further on the particular details of this case, particularly when any such response from me may diminish our government’s capacity to deal with future matters of this type in Australia’s best interests.”

One Australian remains in prison in Tehran. British-Australian academic Dr Kylie Moore-Gilbert was arrested last year on allegations of spying.

Cambridge-educated Moore-Gilbert, a lecturer in Islamic studies at the University of Melbourne’s Asia Institute, has reportedly been tried and convicted of espionage and sentenced to 10 years imprisonment.

She is currently being held in Tehran’s notorious Evin prison, and has endured significant periods of solitary confinement. She has had limited consular access from Australian officials and no contact with her family or friends.

Moore-Gilbert’s research has drawn her into areas that could be perceived as sensitive, particularly by an Iranian regime under acute pressure from economic sanctions and deeply suspicious of foreign academics and journalists. She has written extensively about revolutions and activism in the Middle East, with a particular focus on Shia Islam, Bahraini politics and its protest movements.

At the time she was arrested she held a grant examining “Iran’s relationship with Bahrain’s Shia after the Arab uprisings”. The grant was part of the University of Melbourne’s early career researcher grants scheme.

Payne said “very long-term negotiations” were taking place to secure the release of Moore-Gilbert, but the minister conceded her situation was “very complex”.

“She has been detained for some considerable time, and has faced the Iranian legal system and has been convicted and sentenced … we are continuing our discussions with the Iranian government and we do not accept the charges upon which she was convicted and we would seek to have her returned to Australia.”

Relations between Iran and Australia are robust. Australia has maintained diplomatic relations with Tehran through recent decades where other western nations have abandoned them, or they have become acutely strained.

But in August, the Australian prime minister committed to a US-led mission to patrol the Strait of Hormuz off Iran’s south coast through which about a fifth of the world’s oil passes. The prime minister, Scott Morrison, said “destabilising behaviour” – a thinly veiled reference to Iran’s capture of foreign-flagged ships – was a threat to Australian interests.