Odinga supporters gather for his mock "swearing-in" ceremony in Nairobi on Tuesday.
Nairobi, Kenya (CNN)Kenyan opposition leader Raila Odinga, who boycotted the country's disputed election last year, swore himself in as the "people's president" at a mock inauguration ceremony Tuesday in protest against President Uhuru Kenyatta.
Thousands of opposition supporters gathered at Uhuru Park in central Nairobi to attend the "swearing-in" protest event, which was organized by Odinga's National Super Alliance (NASA). Police fired tear gas in an attempt to disperse crowds pulling down signs near the park on Tuesday.
Authorities had earlier said they would put a stop to any illegal meetings, but Reuters reported that no uniformed police could be seen in the park and no anti-riot officers or vehicles were visible.
Kenyatta won a second presidential term with 98% of the vote following a controversial election re-run in November. The country's Supreme Court nullified the previous ballot, also won by Kenyatta, due to "illegalities and irregularities."
Odinga and his opposition party dropped out of the second vote, claiming the election commission had failed to implement any reforms.
NASA says it wants to create an alternative government in protest Kenyatta's rule. Some are hoping Tuesday's event will push Kenyatta, who promised to work towards national unity during his second term, to include opposition leaders in dialogue and in his ministerial appointments.
But the government has warned that Tuesday's events amount to treason -- an offense punishable by death, according to Kenyan law.
Related: How Kenya's presidential election unraveled
Odinga holds a bible during an opposition rally on January 27.
TV stations switched off
Ahead of the event, three of the country's largest television stations were pulled off air by the government -- a move not seen in the country for years.
"President Kenyatta expressly threatened to shut down and revoke the licenses of any media that would broadcast the planned purported swearing in of NASA leaders Raila Odinga and Kalonzo Musyoka on Tuesday," Kenya Editor's Guild Chairman Linus Kaikai said in a statement on Monday night.
Local channels KTN, NTV and Citizen television's free-to-air channels were turned off beginning around 10:00 a.m. (2:00 a.m. ET) Tuesday morning.
CNN has reached out to the government and is awaiting comment.
Judge: Ceremony is treason
The election-related drama in the east Africa's economic hub has been stuttering along for months, and on Tuesday a state of apprehension hung in the air.
National newspapers captured the sense of uncertainty: one headline read "Moment of truth," while another read "What to expect on this day of conflict".
While not specifically naming Odinga, Attorney General Githu Muigai warned last month that any attempt to hold an alternative swearing-in event amounted to treason.
Police use tear gas to disrupt opposition supporters in Nairobi on Tuesday.
"The swearing in of any person not lawfully declared to have won an election by the independent election and boundaries commission, and the swearing in that is not conducted by the chief justice of the Republic of Kenya is a process wholly unanticipated by the constitution and is null and void and illegal," Muigai said.
"The criminal law of the Republic of Kenya stipulates that sort of process is high treason ... It is high treason of the persons involved, and any other person facilitating that process," he added.
Observers fear that Tuesday's protest could lead to more public unrest. At least 92 people were killed in election-related violence, according to a report from Kenya's National Commission on Human Rights.