SEOUL (Reuters) - South Korean software mogul Ahn Cheol-soo clinched his centrist People’s Party nomination to run for president on Tuesday, roaring back into contention in the May 9 vote after abandoning his presidential ambitions in 2012.

Ahn Cheol-soo reacts after winning the nomination as a presidential candidate of the People's Party, during a national convention, in Daejeon, South Korea, April 4, 2017. REUTERS/Kim Hong-Ji

Ahn, 55, has taken a tougher stance on national security than the liberal frontrunner for president, Moon Jae-in, who won his Democratic Party’s nomination on Monday, saying there should be no mistake about the dangers presented by North Korea.

He has vowed to level the playing field for small business and conglomerates and provide equal opportunity for youth from all backgrounds to inject fresh breath into an economy showing signs of sputtering weighed by injustice and corruption.

Impeached former president Park Geun-hye was dismissed last month over a corruption scandal that has implicated some conglomerates and rocked the country for months.

“We need to elect a capable president who can revive the economy. We need a president who can accomplish strong and robust national security,” Ahn said in his acceptance speech.

“The time for Ahn Cheol-soo is here and the time for Moon Jae-in is slipping away.”

Ahn was a top contender for the 2012 presidential election but withdrew his candidacy and endorsed Moon in a bid to unite non-conservative voters against eventual winner Park.

Slideshow ( 3 images )

Trained as a medical doctor, Ahn rose to national fame when AhnLab, a provider of computer anti-virus software, became a household name.

Ahn entered politics in 2011 using his popularity to endorse an independent candidate as mayor of the capital, Seoul, then was elected to parliament two years later.

He sought to find a new way in South Korean politics long marred by ideological and regional division, founding the People’s Party last year that emerged as a major political force in the parliamentary election last year.

He initially struggled in the presidential race, triggered by the impeachment of Park, but has shot to second place in recent opinion polls, with 19 percent support in a poll released on Friday.

Ahn has advocated a tough line against reclusive North Korea, which has been heavily sanctioned for missile and nuclear tests in breach of UN Security Council resolutions, even while keeping the door open to dialogue.

“He (North Korean leader Kim Jong Un) is a very dangerous person, isn’t he? He has done things that are beyond our imagination to maintain his power,” Ahn told a group of journalists last month.

“A summit between the South and the North should not be an end in itself ... (but) if it can be a tool to solve problems, we should consider it.”

Ahn has said the deployment of the controversial U.S. THAAD missile defense system must go ahead and South Korea must make greater efforts to convince the Chinese, which has reacted angrily to the move, that it is not aimed at them but only at countering the missile threat from North Korea.

If North Korea carried out any attacks on South Korean soil as it did in the 2010 bombing of an island in the South, Ahn said he would respond with a “surgical strike” against the North.

North and South Korea are technically still at war because their 1950-53 conflict ended in a truce, not a peace treaty. The North regularly threatens to destroy the South and its main ally, the United States.