COLOMBO, Sri Lanka — President Mahinda Rajapaksa’s health minister quit on Friday to become the opposition candidate in the election set for January, surprising the incumbent with a united and robust challenge to his bid for an unprecedented third term.

At least five other presidential loyalists also abandoned Mr. Rajapaksa to join the defection led by the health minister, Maithripala Sirisena, who also had been the ruling party’s general secretary.

Mr. Sirisena said in his resignation announcement that he had been nominated by a united group of opposition parties to be the main challenger against Mr. Rajapaksa in the Jan. 8 vote.

Others who quit the ruling alliance included the fisheries minister, Rajitha Senaratne; the education services minister, Duminda Dissanayake; and M. K .D .S. Gunewardane, a deputy minister. Vasantha Senanayake and Rajiva Wijesinha, members of Parliament from the ruling Sri Lanka Freedom Party, also defected to the opposition.