Boris Johnson has called for the release of detained British-Iranian national Nazanin Zaghari-Ratcliffe during a meeting with Iran's president.
The prime minister invited his counterpart, Hassan Rouhani, to London "where we can discuss things more".
The pair spoke at a UN summit in New York on Tuesday amid heightened tensions between the UK and Iran.
No 10 said Mr Johnson also raised "deep concern about Iran's destabilising activity in the region".
Their meeting came after Mr Johnson blamed Iran for attacks on Saudi Arabian oil facilities.
In the lead up to the summit, Mr Johnson faced pressure to take a tougher line over the detention of Mrs Zaghari-Ratcliffe and other dual nationals held in Tehran.
Mrs Zahgari-Ratcliffe is half way through a five-year jail term after she was convicted of spying in 2016 - which she denies.
Her husband, Richard Ratcliffe, urged Mr Johnson to tell his Iranian counterpart "enough is enough" and former foreign secretary Jeremy Hunt said he should call out Iran for its "diplomatic hostage taking".
Downing Street said the prime minister called for the "immediate release of Nazanin Zaghari-Ratcliffe and other dual nationals illegally imprisoned in Iran" during his meeting with Mr Rouhani.
A number of people with dual Iranian and foreign nationality have been held in Iran in recent years and two British-Australian women and an Australian man were detained in September.
Speaking to the Iranian president, Mr Johnson said the UK had "serious concerns about the detention of dual nationals in Tehran and we are looking forward to make progress on that".
He added that his visit to Tehran in 2017 while he was foreign secretary was "very productive but so far inconclusive".
"I think we still have a lot of progress to make," he added.
'Nuclear deal defects'
In a departure from previous UK policy, Mr Johnson also criticised the Iran nuclear deal - under which Iran agreed to limit its sensitive nuclear activities in return for the lifting of economic sanctions.
He said the deal - known as the Joint Comprehensive Plan of Action (JCPOA) - had "many defects".
But he reaffirmed the UK's commitment to the deal in a joint statement with France and Germany.
Downing Street later said the prime minister had confirmed the UK's "continuing support" for the JCPOA "and stressed the need for dialogue, including on a comprehensive successor deal".
The future of the nuclear deal has been uncertain since the US abandoned the agreement in 2018.
In July, Iran said it would be breaching the deal by breaking a limit set on uranium enrichment - but the UK, France and Germany reiterated their support for the deal.
Tensions between the UK and Iran have worsened in recent months following a row over the seizure of oil tankers in the Gulf.
Relations strained further on Monday after the UK, France and Germany agreed that Iran was responsible for the attack on Saudi oil facilities on 14 September.