CHICAGO -- The Illinois Supreme Court put Rahm Emanuel back on the ballot for Chicago mayor on Thursday, reviving his campaign to lead the country's third-largest city. The former White House chief of staff was thrown off the Feb. 22 ballot by an Illinois appellate court for not meeting a residency requirement because he hadn't lived in Chicago for a year before the race. The Supreme Court ruled unanimously in his favor. Emanuel lived for nearly two years in Washington working for President Barack Obama until he moved back to Chicago in October to run for mayor. Emanuel, who has said he always intended to return to Chicago and was only living in Washington at the request of the president, had asked the Supreme Court to overturn the appeals court ruling. Within minutes of the ruling, Emanuel was at a downtown Chicago public transit station shaking hands with residents. He never stopped campaigning as the controversy evolved. His spokesman said Emanuel was en route to the campaign appearance when he received word of the ruling and was scheduled to participate in televised debate Thursday evening. In their appeal, Emanuel's attorneys called Monday's appeal court ruling "one of the most far-reaching election law rulings" ever issued in Illinois, not only because of its effect on the mayoral race but for "the unprecedented restriction" it puts on future candidates. His lawyers raised several points, including that the appeals court applied a stricter definition of "residency" than the one used for voters. They say Illinois courts have never required candidates to be physically present in the state to seek office there. In its ruling, the Supreme Court called the appeals court's basis for deciding that Emanuel could not be on the ballot "without any foundation in Illinois law." The mayoral race and Emanuel's campaign had been thrown into disarray after the appellate court ruling on Monday. The following day, the state Supreme Court ordered Chicago elections officials to stop printing ballots without Emanuel's name on them. Chicago election officials said they had printed nearly 300,000 ballots without Emanuel's name before they abruptly stopped. Emanuel had been the heavy favorite to lead the nation's third-largest city, and had raised more money than any of the other candidates vying to replace Mayor Richard M. Daley, who announced he was retiring after more than two decades as mayor. After Monday's appeals court ruling, Emanuel had been pressing ahead with confidence and said was doubling his campaign by adding more stops to his schedule. Meanwhile, the other main candidates in the race - former Sen. Carol Moseley Braun, city Clerk Miguel del Valle and former Chicago schools chief Gery Chico - moved quickly to try to win over Emanuel supporters. The residency questions have dogged Emanuel ever since he announced his candidacy last fall. Emanuel tried to move back into his house when he returned to Chicago but the family renting it wanted $100,000 to break the lease and move out early. The tenant, businessman Rob Halpin, later filed paperwork to run for mayor against Emanuel, only to withdraw from the race a short time later. The Supreme Court was also impressed with Emanuel's testimony before the city's election board in which he listed all the personal items in the house he rented in Chicago when he moved to Washington - including his wife's wedding dress, photographs of his children and clothes they wore from the hospital as well as items belonging to his grandfather. "The Board determined that, in this situation, the rental did not show abandonment of the residence," the court wrote. "This conclusion was well supported by the evidence and was not clearly erroneous." More than two dozen people testified on the residency issue at a Chicago Board of Elections hearing in December. The three-day hearing got progressively stranger as attorneys gave way to Chicago residents who filed objections to his candidacy, including one man who asked Emanuel if he caused the 1993 siege at Waco, Texas. The Chicago Board of Election Commissioners and a Cook County judge has previously both ruled in favor of Emanuel, a former congressman, saying he didn't abandon his Chicago residency when he went to work at the White House.