Last week Raila Odinga said the Kenya presidential election results were a "travesty" but said he would settle the dispute in court and urged supporters to remain peaceful.
The election commissioner declared Deputy President William Ruto had won the election by a slim margin, but four out of seven election commissioners dissented, saying the tallying of results had not been transparent.
In filing the court challenge to the election, Odinga attorney Daniel Maanzo announced "What we did this morning is to file the online copy," adding "After today there will be four days for the other parties to reply."
A source at the judiciary confirmed they had received a copy of the filing.
Petitioners must submit their complaint to the Supreme Court within seven days of the results being declared.
The court next conducts a status conference with all parties to define the hearing schedule and ground rules.
The constitution requires the nation's highest court to issue its decision within 14 days of the lawsuit being filed.
This is Odinga's fifth stab at the presidency; he blamed several previous losses on rigging. Those disputes triggered violence that claimed more than 100 lives in 2017 and more than 1,200 lives in 2007.
In 2017, the Supreme Court overturned the election result and ordered a re-run, which Odinga boycotted, saying he had no faith in the election commission.
This time, Odinga is backed by the political establishment. President Uhuru Kenyatta endorsed Odinga's candidacy after falling out with Ruto after the last election.
At stake is control of East Africa's wealthiest and most stable nation, home to regional headquarters for firms like General Electric, Google, and Uber. Kenya also provides peacekeepers for neighboring Somalia and frequently hosts peace talks for other nations in the turbulent East Africa region.