Mr Macaire said that he was arrested 30 minutes after leaving the area, although he was later released.
The semi-official Tasnim news agency said he was one of a number of people arrested outside the Amir Kabir University on suspicion of organising, provoking, and directing radical actions.
The Ministry of Foreign Affairs later said on its Telegram channel that he had been summoned over his “illegal and inappropriate presence” at the protests. The Foreign Office confirmed that Mr Macaire had been called in.
He was said to have protested strongly that his detention had been unjustified and that it was “completely untrue” to say he had been involved in the protests.
The authorities in Iran were on standby for further demonstrations after the Revolutionary Guard admitted accidentally shooting down the Ukrainian jet with the loss of all 176 people on board.