The trials are widely seen as part of a plan by President Abdulla Yameen to tighten his grip on power ahead of elections in September at which he seeks a second five-year term against an opposition yet to decide on a single candidate. The government denies this.
The country of 400,000 people is popular with tourists but has seen political unrest since its first democratically elected leader, Mohamed Nasheed, was forced to quit amid a police mutiny in 2012.
Nasheed was convicted of terrorism charges in 2015 and sentenced to 13 years after a trial criticized as unfair.
Gayoom, who is the country's longest serving leader, Chief Justice Abdulla Saeed and Supreme Court Justice Ali Hameed were found guilty on Wednesday after they were charged for refusing to hand over their mobile phones for a police investigation.
They received sentences of 19 months and six days.
The Indian Ocean island chain has faced upheaval since February, when Yameen, half brother of Gayoom, imposed a 45-day state of emergency to annul a Supreme Court ruling that quashed the convictions of nine opposition leaders, including Nasheed.
During the emergency, authorities arrested the three men and a Supreme Court administrator on charges of trying to overthrow the government. They still face those charges.
Saeed and Hameed refused the opportunity to make a closing argument saying their lawyers had earlier quit, citing grave procedural defects with the trial.
Criminal Court Judge Hassan Najeeb refused multiple appeals by the defendants to be given time to appoint new lawyers.
The opposition has accused Yameen's government of jailing leaders who could challenge Yameen's re-election bid, a charge the government denies.
Rights group Amnesty International said in a statement the convictions are politically motivated and should be quashed because the trials did not meet international standards.
Athul Keshap, the U.S. Ambassador for Maldives said in a tweet that an unfair trial with no defence witnesses or defence lawyers would always result in an unfair sentence.
"Judges cannot serve the cause of fair and impartial justice if they fear the Executive. When will the people of #Maldives see the restoration of rule of law?," Keshap said on Twitter.
Gayoom told the court he denied the charges and said the trial was unfair. Najeeb said the trial was conducted in accordance with the law.
Dunya Maumoon, the daughter of Gayoom, who resigned from Yameen's government after her father was arrested, said her family was deeply shocked by the convictions.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)