Two young men have been killed in a drive-by shooting in Iran during a Shia religious festival, just hours after five Shia Muslims were killed in a similar attack in Saudi Arabia.

Hossein Karimi Yeganeh, 28, and Bahman Rezaie, 25, were killed after assailants approached the crowds gathered for the Ashura festival, south-western province of Khuzestan, at around 11.30pm Friday night and opened fire.

Two other people were injured in the attack but they are believed to be recovering in hospital, according to semi-official state news channel Fars.

No group has yet claimed the attack.

Ashura is a festival of mourning that commemorates the death of Hussein, a grandson and companion of the Prophet who is seen as a leader by both Sunni and Shia Muslims.

The incident in Iran follows a similar-style attack in Saudi Arabia, earlier on Friday, in which five people were killed and nine wounded after a gunman opened fire outside a mosque in Saihat, eastern province. That attack was claimed by Isis, also known as the Islamic State.