A media mogul and a former law professor who are vying to be Tunisia's next president sparred during a televised debate over how to fight terrorism and poverty.

Then the two candidates cordially shook hands, an act Tunisian voters are celebrating as a sign that the democracy built on their country's 2011 Arab Spring uprising is on the right track.

Tycoon Nabil Karoui and professor Kais Saied are competing in a runoff presidential election on Sunday. Neither has held political office before.

Supporters of independent Tunisian Presidential candidate Kais Saied attend a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

Supporters of independent Tunisian Presidential candidate Kais Saied attend a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

Karoui promised during Friday night's debate to combat extremist acts by tackling poverty. He said he would pursue investments from companies like Google and Netflix.

Saied promised to give struggling provinces and young people more power.

Both men said Tunisia should work to bring peace to neighboring Libya.

Supporters of Tunisian presidential candidate Nabil Karoui attend a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

Supporters of Tunisian presidential candidate Nabil Karoui attend a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

Tunisian presidential candidate Nabil Karoui speaks to his supporters at rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

Tunisian presidential candidate Nabil Karoui speaks to his supporters at rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. (AP PhotoMosa'ab Elshamy)

A supporter of independent Tunisian Presidential candidate Kais Saied attends a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. Poster in Arabic shows the number and slogan of Kais "People's wish." (AP PhotoMosa'ab Elshamy)

A supporter of independent Tunisian Presidential candidate Kais Saied attends a rally on the last day of campaigning before the second round of the presidential elections, in Tunis, Tunisia, Friday, Oct. 11, 2019. Poster in Arabic shows the number and slogan of Kais "People's wish." (AP PhotoMosa'ab Elshamy)