(AFP) -- "If Iran wants to have good relations with Saudi Arabia, it has to change its policies. It has to respect international law," Jubeir told a press conference in London.
"The hajj is a religious obligation, it has nothing to do with politics," he added, referring to the pilgrimage which forms one of the five pillars of Islam.
Despite the two countries having severed diplomatic relations, some 86,000 Iranian pilgrims took part in the hajj last week.
Iranians had been unable to participate in 2016 after talks collapsed over security concerns, following a stampede the previous year which killed up to 2,300 people, including hundreds of Iranians.
Earlier on Tuesday Iran had thanked Saudi Arabia for running a successful hajj this year, saying it opened the way for negotiations.
"We thank Saudi Arabia... for adopting a new approach in dealing with Iranian pilgrims," said Ali Ghazi-Askar, the head of the hajj organisation in Tehran, according to the state broadcaster.
He added that it marked an opportunity for the two sides to "resolve their bilateral issues in other fields".
Iranian Foreign Minister Mohammad Javad Zarif was more cautious, saying he had yet to see "a clear prospect for change" in the relationship.