Police in Missouri have shot dead a man armed with a knife amid a major escalation in tensions over last week's killing of an unarmed teenager.

Police said they came under "heavy gunfire" and arrested more than 30 people as racially charged tension boiled over in the St Louis suburb of Ferguson.

The latest killing happened only a few kilometres from where 18-year-old Michael Brown was shot dead by police last week, sparking the protests.

Jane Cowan reports from Ferguson

The graffiti on the walls reads "fuck the police" and "the only good cop is a dead cop".

But men are handing out roses and children ride on their fathers' shoulders.

Passing motorists honk their horns and on the sidewalk people raise their hands in reply. "Hands up, don't shoot," they shout, in reference to witness accounts that 18-year-old Mike Brown had his hands in the air surrendering when he was shot.

A woman cries out in a lilting gospel cadence: "The FBI is here. So is God."

This is the surreal scene in Ferguson, Missouri.

The anger here runs deep. Every single black man I speak to has a story about how he's been harassed or racially profiled by police. "I am Mike Brown," they tell you.

Barack Obama knows it. "Too many young men of colour are left behind and seen only as objects of fear," he said.

There is hurt in the young faces here. But there's also something else. Excitement?

"This is the biggest thing that ever happened in American history, period," one protester tells me, his eyes shining.

There is the sense that these are young people looking for a moment.

Their grandparents had the civil rights struggle and Dr Martin Luther King.

Now there's a black man in the White House but their lives haven't necessarily improved.

The school system is crumbling. This year for the first time in four years Missouri didn't have the highest rate of black homicide in the entire country.

Black men across the country disproportionately fill the jails.

"It's like you're the main attraction and we're the side show," one man tells me.

The shooting death of an unarmed teenager walking to his grandmother's house is the straw that broke the camel's back.

For a split second these young black men have the world's attention. They want to seize the day.

St Louis police chief Sam Dotson said in a tweet that officers had responded to a call and found an apparently agitated man, armed with a knife who yelled "kill me now" and approached the patrol.

In a tweet from his own account retweeted by his force, Mr Dotson said: "Officers gave suspect verbal commands. Officers feared for their safety and both officers fired their weapons. Suspect is deceased."

The world's media descended on the street where the latest police shooting took place, with dozens of reporters in the nearby suburb of Ferguson covering the ongoing unrest.

Onlookers gathered at the yellow incident tape sealing off the scene of Tuesday's shooting outside a convenience store in St Louis, some of them chanting the slogan of the protests: "Hands up, don't shoot."

On August 9, a white police officer in Ferguson shot and killed 18-year-old unarmed black student Michael Brown, triggering more than a week of sometimes violent protests against heavy-handed police tactics.

Political leaders have called for calm and a change in police tactics in Ferguson, where the violence has captured headlines around the world and raised questions about the state of US race relations nearly six years after Americans elected their first black president.

Law enforcement has made various efforts to soothe angry demonstrators, but police said they had come under heavy gunfire on Monday night (local time) and arrested 31 people despite the deployment of Missouri National Guard troops and the lifting of a curfew to allow protesters to have more freedom to demonstrate.

"We overpoliced for a few days, and then we completely underpoliced," US senator Claire McCaskill, a Missouri Democrat who was traveling to Ferguson, told MSNBC.

She said she was working with local leaders on ways to quell the violence. Possible methods included screening for weapons and moving protest areas away from the business district to open green spaces.

Both she and Congressman Emanuel Cleaver, another Missouri Democrat, said calm was needed to allow federal investigators to evaluate the evidence.

"What's happening now is damaging, or interfering, with what needs to be done," Mr Cleaver told MSNBC.

Yesterday, president Barack Obama said he told Missouri governor Jay Nixon that use of the National Guard should be limited, and he also called for conciliation. Attorney-general Eric Holder plans to visit Ferguson on Wednesday.

On Monday night, officials had hoped that the lifting of a curfew imposed over the weekend would cool tensions and end the looting and violence. Police also closed a road to traffic to provide a path for marchers.

But police said some in the crowd hurled bottles, rocks and petrol bombs at officers, who responded by firing gas-filled canisters and a noise cannon to try to disperse the throng.

State Highway Patrol captain Ron Johnson, who is overseeing security in Ferguson, said officers had come under "heavy gunfire" but did not return it. Riot police did confiscate two guns and what looked like a petrol bomb from protesters.

Four officers were injured, he said.

"This has to stop," said Johnson, an African-American who grew up in the area. "I don't want anybody to get hurt. We have to find a way to stop this."

The funeral of Michael Brown will take place on Monday, the family's attorney said.