SÃO PAULO, Brazil—Brazil's ruling party finds itself courting an ascendant evangelical vote that on Sunday helped spoil an expected first-round victory for Dilma Rousseff, the would-be successor to President Luiz Inácio Lula da Silva.

As the leftist Workers Party regroups ahead of an Oct. 31 runoff, it wants to guarantee Ms. Rousseff maintains a significant advantage over her rival, José Serra, the centrist former governor of São Paulo state.

Having gone into the vote with opinion polls suggesting she could clinch the election in one round, Ms. Rousseff failed to garner the majority required to do so, reaping 47% of the vote, compared with Mr. Serra's 33%.

To win back its momentum, the party is scrambling to lure back evangelical voters who defected to other candidates late last week.

Many religious voters withdrew their support for Ms. Rousseff after an aggressive Internet campaign convinced them that the candidate favors legalized abortion.