QUITO, Ecuador — Ecuador’s Supreme Court on Monday ordered the jailing of Vice President Jorge Glas while he is investigated for allegedly taking bribes from a Brazilian construction giant involved in a sprawling regional graft scandal.

Judge Miguel Jurado accepted a request from prosecutors that Glas be detained to guard against any attempt to escape. Until Monday’s ruling Glas was been free but barred from leaving the country.

Glas, who has repeatedly denied any wrongdoing, took to Twitter to denounce the ruling as politically motivated. Still, he said he would respect the ruling, which he called “disgraceful attack” built on “forged” or non-existent evidence.

“You don’t have to go looking for me, I’m where I’ve always been,” he tweeted, vowing that he would exhaust all appeals nationally and internationally to clear his name.

Across Latin America, once seemingly untouchable politicians, including the former leaders of Brazil and Peru, have been charged or are under investigation for purportedly taking bribes or illegal campaign contributions from Odebrecht as part of the construction company’s rapid expansion across the region the past decade.

Glas is highest-ranking official in Ecuador to be investigated for allegedly receiving some of the $33 million that the Odebrecht construction company has acknowledged paying in exchange for contracts when he served as vice president from 2013 to 2017. The case is partly built on testimony by former Odebrecht executives as well as former government officials.

But Glas’ fall from grace has been compounded by the nation’s fast-shifting political landscape and a rupture in the ruling leftist coalition started by former President Rafael Correa.

In August, President Lenin Moreno stripped Glas of all of his duties as vice president, relegating him to a mostly ceremonial role. Glas has refused to resign and in turn accused Moreno of betraying the legacy of Correa, who has also harshly criticized his successor.

Moreno, whose toughness on corruption and efforts to build bridges with the opposition have proved wildly popular with Ecuadoreans, is now looking to corner his rivals even further.

He is expected to unveil a proposal for a nationwide referendum in which he is likely to ask voters whether they want to eliminate the possibility of indefinite re-election, something that could pave the way for Correa’s return to power in 2021.