RIO DE JANEIRO -- Crying, chanting and screaming in anger, thousands gathered in front of the Rio de Janeiro state legislature Thursday to say goodbye to a black city councilwoman shot in the head four times, a brazen murder that shocked Brazil and raised questions about the effectiveness of a military intervention in the country's second biggest city. Marielle Franco was slain Wednesday night while returning from an event focused on empowering young black women.

Her death touched a nerve in Latin America's largest nation, where more than 50 percent identify as black or mixed-race yet most politicians are white men.

A police official told The Associated Press that the 38-year-old Franco appeared to have been targeted by perpetrators who knew exactly where she would be sitting in a car with tinted windows. The official agreed to reveal the details only if granted anonymity because he was not authorized to discuss the case publicly.

Get Breaking News Delivered to Your Inbox

In the attack in the Rio neighborhood of Estacio de Sa, Franco's driver, Anderson Pedro Gomes, also was killed and her press officer, Fernanda Chaves, was injured.

"They are trying to silence our voice, the voice of all black women in this country," said Larissa Neves Lago, one of those mourning Franco.

"Marielle is here! Today and forever," some chanted in the crowd.

Elected in 2016, Franco was a member of the left-leaning Socialism and Liberty Party known for her social work in poor and marginalized shantytowns, or favelas, and for her outspokenness against police violence, which disproportionately affects black residents.

Just last weekend, Franco lamented on social media what she alleged were recent police killings.

"Another homicide of a young man that could be credited to the police. Matheus Melo was leaving church when he was killed. How many others will have to die for this war to end?" she wrote in her last post on Twitter.

Marielle Franco's murder shocked the nation. AFP / Getty Images

Franco grew up in Mare, an area of northern Rio with a warren of favelas that sometimes erupt in violence. Her rising star status in politics was notable in a nation where upward social mobility, particularly for blacks and others from marginalized neighborhoods, is rare.

Protests were planned in several cities Thursday evening, and Franco's party called for a march in Rio on Friday.

As news of the attack spread Thursday morning, several thousand people gathered in front of Rio's city hall. In the afternoon, thousands followed as the coffins were carried to their respective burial sites.

Human rights groups and the United Nations offered condolences and demanded full investigations.

The attack came just a month after President Michel Temer put the military in charge of security in Rio, which is experiencing a spike in violence less than two years after hosting the 2016 Summer Olympics.

The intervention has been controversial because it has put thousands of troops on the streets and, at least so far, doesn't appear to be having an impact. It's also being criticized because generals don't appear to have the appetite to take on major components of the violence: endemic police corruption and heavy-handed tactics.

Rio's police force is one of the most deadly in the world. In 2016, 925 people were killed during police operations, according to the think tank Brazilian Public Security Forum. Tallies by human rights groups put the 2017 number over 1,000.

Brazil's public security minister, Raul Jungmann, said in a statement that federal police would help investigate. That was a subtle way of saying the government did not think the local police force, which would usually be solely responsible for investigating a killing, is up to the task. Rio's police chief quickly refused help.

"I would like to tell the friends of relatives of Marielle that we will find those responsible and punish them for this barbaric crime," Jungmann said, according to the BBC. "Justice will be done."

Gen. Richard Nunes, appointed as Rio's public security secretary, said in a statement there will be a "full investigation on the assassination."

At Brazil's Congress in Brasilia, lawmakers of Franco's party demanded that an independent commission investigate the crime. Some wondered publicly whether Franco might have been targeted by police.

Temer, a political adversary of Franco's, called the assassination "an act of cowardliness" and defended the military intervention in a video statement to the nation.

Former Presidents Fernando Henrique Cardoso, Luiz Inacio Lula da Silva and Dilma Rousseff also expressed grief over the killing, which dominated newscasts.

Security consultant Paulo Storani, a former commander of Rio's elite police force known as the BOPE, warned against jumping to conclusions about the police or blaming the military intervention, which he believes will ultimately be ineffective.

"This is an election year and I fear some might use this cowardly act to score political points," Storani said.

Franco's sister, Anielle Franco, told journalists her family is considering leaving Rio out of fear.

"Our favela is crying, Rio is crying and Brazil is crying today," she said.