0821 GMT May 21, 2018
The government cut live transmission of the country's top three TV channels as a huge crowd of tens of thousands gathered in a Nairobi park for the event, AP wrote.
Kenyatta had "expressly threatened to shut down and revoke the licenses of any media house" that aired live broadcasts, the Kenya Editors Guild said in a statement.
Though police were withdrawn without explanation at Uhuru Park, a heavy police presence remained in the capital's slums, which are opposition strongholds. Odinga said he felt vulnerable attending the "swearing-in" after his security was withdrawn.
The 73-year-old Odinga took an oath holding a Bible over his head, amid cheers. The opposition leader called the ceremony a step toward establishing a functioning democracy in Kenya, East Africa's economic hub.
"We are seeing the return of an authoritarian, imperial presidency in our country and rule by fiat, and this must be resisted," he told the Kenya Television Network ahead of the ceremony.
The event came after months of political uncertainty. Kenya's Supreme Court nullified the August election after Odinga claimed that hackers infiltrated the electoral commission's computer system and changed results in favor of Kenyatta.
The ruling was the first time a court had overturned a presidential election in Africa. The court cited irregularities and illegalities and said it ruled against Kenyatta because the electoral commission refused to open its computer system for court scrutiny.
The court ordered a fresh election in October that Kenyatta won and Odinga boycotted, claiming a lack of electoral reforms.
Last week the opposition released what it called "authentic" election results showing Odinga won the August vote, but it refused to say how it obtained the information from the electoral commission's computer servers. The electoral commission called those results "fake."
Police at first had vowed to block opposition supporters from attending Tuesday's ceremony, leading to fears of violence. The government-funded Kenya National Commission on Human Rights has said at least 92 people were killed and dozens of others were sexually assaulted during the months of election turmoil. Most were opposition supporters
Rights advocates accuse Kenyatta's administration of violating constitutionally guaranteed freedoms including those of assembly and expression.