SEOUL, South Korea — Park Geun-hye took office as South Korea's first female president Monday, returning to the presidential mansion she had known as the daughter of a dictator, and where she will respond to volatile North Korea, which tested a nuclear device two weeks ago.

Elected in December, Park also must answer victims of her father's 18-year dictatorship and address worries about a lack of jobs, a growing gap between rich and poor and a stagnant economy. There's pressure for her to live up to her campaign suggestion that she can return the country to the strong economic growth her father oversaw, the so-called Miracle on the Han River.

North Korea's underground atomic detonation tests her vow to soften Seoul's current hard-line approach to its northern rival. Park called the Feb. 12 test, the North's third since 2006, "a challenge to the survival and future of the Korean people" and said Pyongyang should abandon its nuclear ambitions and work for peace.

"There should be no mistake that the biggest victim will be none other than North Korea itself," Park said in her first speech as president during a ceremony where troops in formal uniforms shouted "loyalty" and fired cannons in salute.

At her inauguration, a band played a military march before a crowd of tens of thousands, including U.S. National Security Adviser Tom Donilon, Thai Prime Minister Yingluck Shinawatra and Japanese Deputy Prime Minister Taro Aso. Before Park took her oath of office, South Korean superstar PSY performed his global hit "Gangnam Style." Children and the elderly alike joined him in the contagious horse-riding dance he made famous in the song's video.

As Park was sworn in as president, North Korea's state media continued their typical rhetoric against South Korea and the U.S. over annual military drills that Pyongyang says are an invasion rehearsal.

"The U.S. warmongers should think what consequence will be brought out for getting on the nerves of the DPRK, a dignified nuclear power," the North's main Rodong Sinmun newspaper said in a commentary carried by the official Korean Central News Agency. DPRK refers to the Democratic People's Republic of Korea, the North's official name. It warned the allies would "die in flames" if they start a northward invasion.

Pyongyang, Washington, Beijing and Tokyo are all watching to see if Park pursues an ambitious engagement policy meant to ease five years of animosity on the divided peninsula, or if she sticks with the tough stance of her fellow conservative predecessor, Lee Myung-bak.

Park's decision will likely set the tone of the larger diplomatic approach that Washington and others take in stalled efforts to persuade North Korea to give up its nuclear weapons ambitions.

"If Park Geun-hye wants to contain, the U.S. will support that," said Victor Cha, a former senior Asia adviser to President George W. Bush. "But if Park Geun-hye, months down the road, wants to engage, then the U.S. will go along with that too."

Park's first weeks in office will be complicated by North Korea's warning of unspecified "second and third measures of greater intensity," a threat that comes as Washington and others push for tightened U.N. sanctions as punishment for the nuclear test.

That test is seen as another step toward North Korea's goal of building a bomb small enough to be mounted on a missile that can hit the United States. The explosion, which Pyongyang called a response to U.S. hostility, triggered global outrage.

Park has said she won't yet change her policy, which was built with the high probability of provocations from Pyongyang in mind. But some aren't sure if engagement can work, given North Korea's choice of "bombs over electricity," as American scientist Siegfried Hecker puts it.

The economic aid and other benefits that North Korea would have received by "choosing electricity over bombs ... will be made much more difficult, if not impossible, for at least the next five years," Hecker, a regular visitor to North Korea, said in a posting on the website of Stanford University's Center for International Security and Cooperation.

As she takes office, however, Park will be mindful that many South Koreans are frustrated at the state of inter-Korean relations after the Lee government's five-year rule, which saw the North conduct two nuclear tests and three long-range rocket launches. In addition, attacks blamed on North Korea that killed 50 South Koreans in 2010.

Park's policy calls for strong defense but also for efforts to build trust through aid shipments, reconciliation talks and the resumption of some large-scale economic initiatives as progress occurs on the nuclear issue. Park has also held out the possibility of a summit with new North Korean leader Kim Jong Un.

Park's last stint in the presidential Blue House was bookended by tragedy: At 22, she cut short her studies in Paris to return to Seoul and act as President Park Chung-hee's first lady after an assassin targeting her father instead killed her mother; she left five years later, in 1979, after her father was shot and killed by his spy chief during a drinking party.

Park's transition to power has been rocky, reflecting deep rifts in South Korea that many trace back to her father's dictatorship.

She began her first day as president with lawmakers deadlocked over her government restructuring plans, which include newly created or revamped ministries. Some of the people she has nominated for ministry posts have been accused of tax evasion, real estate speculation and ethical lapses.

Many of Park's nominations for top posts came as surprises, and she was criticized for relying only on a handful of close associates, and for being secretive.

Much has also been made of Park's role as a trailblazer for women in South Korea, which is still a largely male-dominated society. The income gap between men and women is the widest among the world's most developed countries. But Park gave only two of 18 Cabinet posts to women. Late liberal former President Roh Moo-hyun, Lee's predecessor, named four women to his Cabinet when he took over in 2003.

Park also has handed top jobs to people with ties with her late father, reviving claims in the campaign that she doesn't fully understand her father's complicated legacy. Park Chung-hee is both reviled as a dictator and human-rights abuser, and revered for leading South Korea from the economic rubble of the Korean War.

Critics have said Park Geun-hye's North Korea policy lacks specifics. They also question how far she can go given her conservative base's strong anti-Pyongyang sentiments.

But Park has previously confounded ideological expectations. She travelled to Pyongyang in 2002 and held private talks with the late Kim Jong Il, Kim Jong Un's father and predecessor. During the often contentious presidential campaign, she responded to liberal criticism by reaching out to the families of victims of her father's dictatorship.

"I don't think this latest spike in the cycle of provocation and response undermines her whole platform of seeking to somehow re-engage the North," said John Delury, an analyst at Seoul's Yonsei University, noting that North Korea wants a return of large-scale aid and investment from South Korea.