A judge decided on Tuesday that ousted Peru President Pedro Castillo must remain in custody while authorities prepare a rebellion case against him.

The decision by Supreme Court Judge Cesar San Martin Castro could spark more widespread, violent protests by the public, who have been calling for the release of former president Ernesto Castillo, the resignation of his successor, and the scheduling of general elections to select a new president and replace all members of Congress.

According to the judge, Castillo's televised announcement on Wednesday on the dissolution of Congress by presidential order was more than just words; it was the physical evidence of an intent to alter the constitutional structure and the arrangement of governmental authorities.

Castillo could face up to three years in prison if prosecutors get their way, and they plan to ask for that sentence later this week, per Associated Press News.

Castillo claims he is "unjustly and arbitrarily held." He thanked his supporters for their "effort and battle" since his detention in a court on Tuesday morning.

Evidence suggests Castillo was intercepted while trying to contact the Mexican embassy, the court said.

Parliamentarians removed him soon after he attempted to dissolve Congress before an impeachment vote.

Ousted President Pedro Castillo stated, "I will never renounce or abandon this popular cause that has brought me here."

Then, presumably in response to the violent protests calling for his ouster, he ordered the national police and military forces to drop their weapons and stop killing these justice-seeking people.

READ NEXT: Dina Boluarte Is Peru's First Female President After Pedro Castillo Gets Arrested: Who Is She and How Did She Take Presidential Seat? 

Violence Spreads in Peru

There has been a rise in violence during rallies outside of Lima.

The Peruvian Ombudsman's Office revised the fatality toll from last Wednesday's protests to six.

According to a statement, the national records agency decided that one person "does not exist," thus the office deleted them from the list.

All the victims were from poor, rural areas, which were Castillo's base of support as a political newbie and former educator with peasant roots.

Andahuaylas, a little town in the rural Andes, has been the site of four of them.

It is where the poor have fought for years. Castillo, in a runoff election last year, received 44,000 more votes in the area than his closest competitor.

Tuesday found many businesses in that community still closed, with streets obstructed by burning tires, boulders, and tree limbs, U.S. News noted.

Again, some 3,000 individuals, including peasants from neighboring villages and educators, marched to demand Boluarte's resignation.

A smaller group escorted the casket of a demonstrator who died from an apparent gunshot wound on Monday.

Castillo's attorney Ronaldo Atencio contended that he did not raise weapons or organize people capable of overthrowing the current administration, which the Peruvian law requires for someone to be charged with rebellion, 

Ousted President Pedro Castillo Seeks Asylum in Mexico

Mexico has said that it might let Peru's ousted president, Pedro Castillo, stay there.

Castillo, through his lawyer, requested Mexican President Andrés Manuel Lopez Obrador for asylum in Mexico.

In a letter he gave to Lopez Obrador late on Wednesday, Castillo's lawyer asked him to "consider granting asylum ... in the face of the unfounded persecution of justice bodies."

"They intend to prosecute him for mere announcements of will or intention that do not constitute any criminal offence," the letter added.

Ebrard says that Castillo met with Pablo Monroy, Mexico's ambassador to Peru. He said the former president is doing well and spending time with his lawyer.

However, a few Peruvian lawmakers, including the head of the committee for international affairs, asked Lopez Obrador to stay out of their country's business.

READ MORE: How Did Elon Musk Lose $4.5 Billion in His Net Worth? 

This article is owned by Latin Post.

Written by: Bert Hoover

WATCH: Peru's ousted president Pedro Castillo detained by police - From BBC News