CHEMNITZ, Germany (Reuters) - Chancellor Angela Merkel on Friday urged people to stand up against hatred and reject “lies” about a U.N. migration accord during her first visit to the city of Chemnitz since a spate of far-right violence that tarnished Germany’s image abroad.

Slideshow ( 8 images )

Germans were shocked by images of skinheads chasing migrants in the eastern city after the fatal stabbing of a man was blamed on two migrants, one of whom was later released from custody. Members of the far right also clashed with police, performed the banned Hitler salute and attacked a Jewish restaurant.

The violence exposed deep divisions over Merkel’s 2015 decision to welcome almost one million mostly Muslim asylum seekers, and nearly led to the collapse of her government.

Merkel fielded tough questions about that policy and other issues during a two-hour town hall with local residents, calmly telling a man who asked when she would “finally resign” that she would serve out her term, and adding, “We should all accept the results of democratic elections.”

The conservative leader, now in her fourth term, has said she will step down as leader of her Christian Democrats, but plans to remain chancellor through 2021.

But she grew emotional herself on the issue of the United Nations pact to regulate the treatment of migrants worldwide, which she said was being grossly misrepresented by opponents.

“When there’s a lie, we have to expose it,” Merkel said, insisting that the migration pact - approved in July by all 193 member U.N. nations except the United States - was in Germany’s interest since it would require African states and others to halt illegal migration.

“The sovereignty of this country will not be diminished in any way. We will have the right to continue making our own laws,” Merkel said, when asked why Germany supported the pact and others like Poland and the Czech Republic were opposing it.

“What we cannot do is let those who spread hatred and incitement to set our daily agenda,” she said.

Merkel defended her decision not to visit Chemnitz sooner, saying she had not wanted to further polarize the situation.

She also pushed back against critics of media coverage that some felt maligned their city, and said it was incumbent upon those opposed to anti-migrant violence to speak up.

“Those who have nothing to do with (the violence) ... you can’t just say it’s the journalists who make Chemnitz look bad. You have to say, we are also Chemnitz and we want to raise our voices.”

The violence tarnished Germany’s image abroad and took Merkel’s government to the brink of collapse after the domestic spy chief questioned the authenticity of videos showing far-right nationalists chasing immigrants through the city.

A row over the fate of the spymaster, Hans-Georg Maassen, pitted Merkel’s hardline Interior Minister, Horst Seehofer, against her junior coalition partner, the center-left Social Democrats (SPD), who demanded that Maassen must go.

Seehofer initially rescued Maassen from dismissal but later sacked him over a speech given behind closed doors condemning “naive and leftist” government policies.