CAIRO — Egyptians living abroad began casting ballots on Wednesday in a bitterly divisive referendum on an Islamist-backed draft constitution, the start of a vote that has become a test of the country’s nascent democracy.

After two weeks of often violent protests, the main opposition coalition, the National Salvation Front, announced that it would campaign for ‘no’ votes instead of a boycott, reversing earlier declarations that it would not lend legitimacy to the vote. At the same time, the coalition said it might issue a last-minute call for a boycott if several new conditions pertaining to the referendum, which it also announced Wednesday, were not met by Saturday morning.

Separately, a Cairo court delivered a motivating jolt to the opposition, which favors a more secular government, by sentencing an atheist from a Christian family to three years in prison for insulting religion. The verdict was a vivid reminder of opposition fears that the hastily drafted charter does not do enough to protect individual freedoms.

The opposition’s decision not to boycott the referendum followed weeks of fierce internal debates. While liberals questioned the Islamists’ commitment to protecting basic freedoms, many Islamists had questioned the opposition’s willingness to accept the results of democratic elections if those results went against their wishes. Investors saw the opposition’s participation as a sign of stability, and Egyptian stocks recovered almost 3 percent Wednesday after heavy losses during the previous week’s turmoil.