SAN SALVADOR (Reuters) - The two parties that have ruled El Salvador for three decades could lose their grip on power on Sunday if voters choose as president a young outsider from a small third party who has vowed to lift the economy and stem the flow of migrants from one of the world’s most violent countries.

Slideshow ( 3 images )

Opinion polls in the Central American country give former San Salvador mayor Nayib Bukele a strong lead, which could make him the first leader not drawn from the left- and right-wing parties that have ruled El Salvador since 1989.

The ruling Farabundo Marti National Liberation Front (FMLN), needs a massive upset if the leftist party is to cling to power. Its traditional rival, the conservative Nationalist Republican Alliance (ARENA), also lags well behind Bukele, who belongs to a smaller right-wing party called the Great Alliance for National Unity (GANA).

Disenchantment with both dominant parties has provided a solid voter base for Bukele, a 37-year-old businessman. Still, voter surveys indicate the race should be close.

Pollster Mitofsky said in a January poll that Bukele had 57 percent of voter support, while Gallup’s January poll showed him with just 42 percent of support.

To win outright, he must secure more than 50 percent of the vote or face a run-off against his closest rival on March 10. About 5.3 million Salvadorans are registered to vote.

“Thirty years have gone and there have been no changes, the country is getting worse,” 63-year-old mechanic Mauricio Hernandez said at a rally for a Bukele.

Even if Bukele does break the mold of the last three decades, his legislative room for maneuver could be limited because his GANA party is expected to lack a majority in Congress.

Gang violence has made El Salvador one of the world’s most murderous countries in the past few years. The region’s high level of violence is a major factor in the mass migration from Central America to the United States that has drawn the ire of U.S. President Donald Trump.

A year ago, El Salvador sent the United States a formal letter of protest after Trump reportedly disparaged the homelands of some immigrants with an insulting expletive.

Trump made the remark shortly after announcing he would cut a program that allowed some 200,000 Salvadorans to live and work in the United States, a move that gave them about a year and a half to seek lawful residency or return to El Salvador.

Trump has also repeatedly threatened to cut aid to the impoverished country if it did not do more to stem the flow of migrants headed north.

Discontent has swelled under the current FMLN government after corruption scandals engulfed leading politicians in a country struggling with rampant poverty. Sitting President Salvador Sanchez Ceren is barred by law from seeking immediate re-election to a fresh five-year term.

Following in the footsteps of other politicians in the region, Bukele has pledged to root out corruption, adopting the motto: “there is enough money when nobody is stealing.”

A prolific social media user, he also wants to modernize government and push infrastructure projects as a means of curbing emigration to the United States, where one in four Salvadorans live.