FERGUSON, Mo. -- Violent protests erupted after grand jury decided not to indict a Ferguson police officer in the death an unarmed, black 18-year-old whose fatal shooting by a white officer sparked weeks of demonstrations and exposed deep racial tension between many African-Americans and police.

President Barack Obama and the family of Michael Brown asked for calm after a prosecutor announced the decision Monday evening that the grand jury decided not to indict officer Darren Wilson for the August shooting, prompting an angry response from demonstrators. Police used smoke and pepper spray on after protesters grew violent Monday night in Ferguson, where police cars were vandalized and several gunshots were heard.

Wilson's fatal shooting of Brown after an Aug. 9 confrontation reignited a fierce debate over how police treat young African-American men and focused attention on long-simmering racial tensions in Ferguson and around the U.S., four decades after the 1960s civil rights movement. Police were criticized for responding to protests with armoured vehicles and tear gas.

Obama said from the White House that Americans need to accept the decision that the grand jury made.

"We are a nation built on the rule of law, so we need to accept that this decision was the grand jury's to make," Obama said. He said it was understandable that some Americans would be "deeply disappointed -- even angered," but echoed Brown's parents in calling for any protests to be peaceful.

In a late-night statement, the first black president also urged Americans not to deny recent progress in race relations in the U.S., the protests in Ferguson notwithstanding.

Just minutes after the announcement, St. Louis County police used a bullhorn to order a crowd outside the Ferguson Police Department to disperse, saying it had become an unlawful assembly. Protesters continued to hug the barricade and taunt police, sometimes with expletives. Some chanted "murderer." Minutes later, four gunshots were heard down the street.

St. Louis County Prosecuting Attorney Bob McCulloch stressed that the grand jurors were "the only people who heard every witness ... and every piece of evidence." He said many witness presented conflicting statements that ultimately were inconsistent with the physical evidence.

"These grand jurors poured their hearts and soul into this process," he said.

As McCulloch was reading his statement, a crowd gathered around a car from which it was being broadcast on a stereo. When the decision was announced, Brown's mother, Lesley McSpadden, who was sitting atop the car, burst into tears and began screaming before being whisked away by supporters.

The crowd erupted in anger, converging on the barricade where police in riot gear were standing. They pushed down the barricade and began pelting police with items, including a bullhorn. Police stood their ground.

Brown's family released a statement saying they were "profoundly disappointed" in the decision but asked that the public "channel your frustration in ways that will make a positive change. We need to work together to fix the system that allowed this to happen."

The U.S. Justice Department is conducting a separate investigation into possible civil rights violations that could result in federal charges. The department also has launched a broad probe into the Ferguson Police Department, looking for patterns of discrimination.

A grand jury of nine white and three black members had met weekly since Aug. 20 to consider evidence, hearing from 60 witnesses. At least nine votes would have been required to indict Wilson. The panel met in secret, a standard practice for such proceedings.

Brown's shooting inflamed tensions in the predominantly black St. Louis suburb that is patrolled by an overwhelmingly white police force.

It recalled other racially charged cases, from the riots that rocked Los Angeles in 1992 after the acquittal of white police officers in the videotaped beating of black motorist Rodney King. More recently, peaceful protests followed the 2013 not-guilty verdict in the Florida slaying in unarmed black teenager Trayvon Martin by George Zimmerman, who was not a police officer but co-ordinated the local neighbourhood watch.

Authorities quickly stepped up security around a courthouse before the decision was announced there. Barricades were erected, and more than 20 Missouri state troopers were seen silently assembling with rifles, 3-foot (0.91-meter) batons, riot shields and other equipment. Some nearby businesses boarded up their windows, just as many shops have already done near the site of Brown's death in Ferguson.

Speaking for nearly 45 minutes, McCulloch repeatedly cited what he said were inconsistencies and erroneous accounts from witnesses. When asked by a reporter whether any of the accounts amount to perjury, he said, "I think they truly believe that's what they saw, but they didn't."

The prosecutor also was critical of the media, saying "the most significant challenge" for his office was a "24-hour news cycle and an insatiable appetite for something -- for anything -- to talk about."

- Lieb reported from Jefferson City. Associated Press reporter Alex Sanz in St. Louis contributed to this report.