Fonseka received the backing of Chandrika Kumaratunga, a former Sri Lankan president from Rajapaksa's coalition, the Press Trust of India reported, quoting local media. The 64-year-old Kumaratunga was quoted as saying in a statement that she had been concerned about the "prevailing violence and the breakdown in law and order" that poses a serious challenge to the nation's democracy and democratic institutions.
Tuesday's election is expected to be closely contested in the Indian Ocean island nation with 14 million voters.
Both Rajapaksa and Fonseka have been credited with leading the military's victory last May that ended the 26-year-old civil war of the Tamil Tiger rebels for a separate homeland for the Tamil-speaking minority. About 70,000 people died in the civil war.
Fonseka, who quit his top military post after falling out with the Rajapaksa government in the post-war period, is the main challenger though several others appear on the ballot.
Security is expected to be tight for the election, which Rajapaksa called with two years remaining in his current six-year term.
Fonseka has criticized what he calls government corruption and nepotism. Rajapaksa campaigned on development programs he would introduce if re-elected.
Although Fonseka also was credited with ending the rebellion, one of the main parties of the minority Tamils is supporting Fonseka. Ironically, the Tamil vote may decide the election outcome, as the majority Sinhalese votes are largely split between the two contenders.
The Tamils account for about 12 percent to 13 percent of Sri Lanka's population.