Saudi Arabia's top court has upheld the death sentences of 14 men convicted of armed attacks, all of them from the Sunni-ruled kingdom's Shia Muslim minority, a local newspaper reported on Thursday.

The Arabic-language Okaz newspaper also reported that another appeals court upheld the death sentences of 15 people convicted of spying for Iran.

Spokesmen for the justice ministry and the Supreme Court could not immediately be reached for a comment.

The court has the final say on rulings from appeal courts. Death sentences must also be ratified by King Salman.

Four Shia have been executed this month for "terrorism" offences just as tensions between Saudi Arabia and Iran escalate following a visit in May by the US president, Donald Trump, to Riyadh in which he tried to rally Arab countries against Tehran.

Okaz said the 14 men were among 24 people convicted last year of carrying out attacks on police stations in the town of Awamiya and the city of Seihat, both in the Qatif province where many of Saudi Arabia's Shia Muslim community live.

Nine other men from what was known as the "Awamiya Cell" have been sentenced to prison terms ranging from three to 15 years and one was cleared of the charges.

Rights activists and residents said this week that all the men from the Awamiya Cell have been transferred to the capital Riyadh, a sign that they were being readied for execution.

"The sentences were based on confessions that the accused had retracted in court because they were taken by pressure and torture," a Saudi rights activist familiar with the case told Reuters by telephone.

The activist, who asked not to be named, said family members have confirmed that the men had been moved to prisons in Riyadh and were now worried they may be executed at any time.

Amnesty International, in a statement on Monday, urged King Salman not to ratify the death sentences.

"King Salman’s signature is now all that stands between them and their execution," said Samah Hadid, the Middle East director at Amnesty International.

"He must immediately quash these death sentences which are a result of sham court proceedings that brazenly flout international fair trial standards."