Updated

A popular Rio de Janeiro councilwoman was shot in the head four times by assassins, police said Thursday, a brazen murder that shocked Brazil and raised questions about the effectiveness of a military intervention in the city.

A police official told The Associated Press that 38-year-old Marielle Franco was killed Wednesday night by perpetrators who appeared to know exactly where she would be sitting in a car with tinted windows. The official revealed details on condition of anonymity because he was not authorized to discuss the case publicly.

In the attack in the Rio neighborhood of Estacio de Sa, driver Anderson Pedro Gomes was killed and Franco's press officer, Fernanda Chaves, was injured. It happened after Franco participated in an event focused on empowering young black women.

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

Just last weekend, Franco, who was black, 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.

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

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

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

The killing comes 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 so-called intervention is 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 that the government did not think local forces, which would usually be solely tasked with investigating, were up to the task. Rio's police chief quickly refused help.

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 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 incident that dominated news casts.

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.

___

Savarese reported from Sao Paulo.

___

Follow Peter Prengaman: twitter.com/peterprengaman

Follow Mauricio Savarese: twitter.com/MSavarese