The executions were conducted in Riyadh, Mecca, Medina and Asir.
The Saudi interior ministry said the people executed were all Saudi nationals convicted on charges that included adopting extremist ideology, forming terror cells and attacking security headquarters.
Cabinet members also expressed their appreciation to Saudi security forces for thwarting an attack on an intelligence center in Zulfi province, north of Riyadh, and arresting the suspects.
This is believed to be the largest execution ordered in a single day since January 2016 when 47 people were executed on the basis of terrorism-related charges.
Saudi Arabia is one of the world's top executioners.
In 2018, Saudi Arabia carried out 149 executions during the whole year.
Those who were executed were found guilty by the Specialized Criminal Court of attacking security installations, killing a number of security officials and working with enemy organizations against the country's interest.
The Saudi interior ministry confirmed the executions, which it described as "implementation of the provisions of the Sharia court against 37 convicted of terrorist and security cases". The display is not typical of the kingdom and was seen as controversial.
'Game of Thrones' Director on Upcoming Battle: 'This Is Survival Horror'
At this point, the next episode looks very bleak and Game Of Thrones is known to take away anything nice given to its fans. Now you know it's going to be terrifying, too, thanks to an Entertainment Weekly interview with director Miguel Sapochnik.
State-run media, such as the Saudi news channel al-Ekhbariya, aired the statement, according to the outlet.
Most of the men put to death on Tuesday were Shia Muslims convicted after "sham trials that violated global fair trial standards" and "relied on confessions extracted through torture", Amnesty worldwide said.
Among those executed were 11 men convicted of spying for Iran and at least 14 convicted of violent offences after participation in anti-government demonstrations.
Many executions in Saudi Arabia are done by beheading in a public square.
"The use of the death penalty is always appalling but it is even more shocking when it is applied after unfair trials or against people who were under 18 at the time of the crime, in flagrant violation of worldwide law", said Maalouf.
The executions bring the number of people executed since the start of the year to 95, according to official announcements.
Iran's foreign minister Javad Zarif also criticised the executions and what he said was United States complicity. The body of one of the men - Khaled bin Abdel Karim al-Tuwaijri - was publicly pinned to a poll for several hours in a process that is not frequently used by the kingdom and has sparked controversy for its grisly display.
Executions are traditionally carried out after midday prayers.