The protests came as Iran rejected anew Saudi claims it was interfering in Yemen by backing the Huthi rebels, and accused Riyadh of seeking to absolve itself of responsibility in the war.
Protesters thronged the city centre chanting "Death to America", "Death to Israel" and "Death to the Saudi (royal) family", according to footage shown on state television.
They also denounced US support for the military operations, the report said.
Some protesters carried placards that read: "From Gaza to Yemen, stop killing children", and state television described the protest as "massive".
More From This Section
In a statement published by Fars news agency, organisers of the protest criticised Riyadh, branding it "the capital that fosters radicalism and terrorism".
They also denounced the Saudi royal family, which they described as "the most prominent manifestation of American Islam and the regime that depends the most on the Great Satan", referring to United States.
Rallies were also organised in other major cities, according to media.
Tensions between Sunni-dominated Saudi Arabia and Shiite Iran have soared following the launch in March of a Riyadh-led aerial campaign against Shiite Huthi rebels in Yemen.
In southern Iran, meanwhile, the secretary of the Supreme National Security Council, Admiral Ali Shamkhani, said in a speech that the Saudi monarchy would meet a brutal end.