In the often tedious world of international diplomacy, Sergio Vieira de Mello was about as close as you could get to a celebrity—though others have used more exact terms. A dazzled journalist once described Vieira de Mello, the Brazilian-born United Nations High Commissioner for Human Rights, as a “cross between James Bond and Bobby Kennedy.”

Vieira de Mello is the subject of Sergio, a new biopic directed by Greg Barker. The film, which debuted at Sundance in January and hits Netflix April 17, follows Vieira de Mello, played by Wagner Moura (Narcos), from East Timor to Baghdad as he struggles to carry out the U.N.’s mission and, in Iraq, stand up to an American occupation intent on steamrolling the intergovernmental organization. Parallel to those weighty responsibilities, Vieira de Mello meets and falls in love with Carolina Larriera (Ana de Armas), a young Argentine-Italian U.N. official.

Throughout the movie, Barker’s depiction of Vieira de Mello hews closely to the Bond/Kennedy characterization, a tough act even for the talented Moura. But based on the diplomat’s actual career, and his veneration by those who knew him, it’s hard to blame the filmmaker for painting a near-hagiographic portrait.

Here’s the real-life story behind the movie Sergio:

Who was Sergio Vieira de Mello?

Before becoming High Commissioner for Human Rights, Sergio Vieira de Mello had spent the entirety of his career at the U.N., holding posts from Bangladesh and Sudan to Lebanon and Kosovo. He was respected by his international peers, even if they didn’t always see eye-to-eye. “Elegant” was one word used to describe him by former Secretary of State Condoleezza Rice. “You just knew that he was somebody who could command a room.”

But Vieira de Mello was more than a charismatic presence—he had earned his reputation from his accomplishments. He assisted in leading 1980s-era negotiations that precipitated the resettlement of tens of thousands of Vietnamese refugees. In the early ’90s, he helped repatriate more than 300,000 Cambodian refugees. During the devastating siege of Sarajevo, he negotiated ceasefires between the Bosnians and Serbs, and managed to facilitate the reconnection of gas lines to heat homes in the city in the dead of winter. In East Timor in Southeast Asia, he was the Administrator of the United Nations Transitional Authority, serving as the de-facto governor of the state from 1999 until 2002.

Who is Carolina Larriera?

Carolina Larriera was a young Argentinian-Italian U.N. worker when she met Vieira de Mello when they were both stationed in East Timor. Vieira de Mello was married at the time, though his two sons were grown (unlike in the film) and he decided begin a new life with Larriera. She accompanied him on the mission to Iraq, serving as an economic official. Larriera was in her offices in the Canal Hotel when the truck bomb that killed Vieira de Mello exploded outside, though she escaped from the building uninjured. In 2013, 10 years after Vieira de Mello’s death, she wrote an op-ed in his memory, in which she criticized what she characterized as inadequate investigation following the attack. “Instead,” Larriera wrote, “the circumstances of the incident were buried under statues and memorial speeches.”

A website under Larreira’s name refers to Vieira de Mello as her “civil union spouse” and lists among her professional accomplishments winning the 2005 Women of the Year Award for Human Rights by the National Council of Brazilian Women. According to the website, she now works in Brazil and Argentina on “human rights, public policy, and leadership issues.”

What happened in East Timor?

East Timor, a former Portuguese colony, had been invaded by neighboring Indonesia in 1975. As many as 200,000 East Timorese died during a decades-long occupation. Following the resignation of President Suharto Indonesian in 1998, the U.N. oversaw a 1999 referendum in which the overwhelming majority of East Timorese voted in favor of independence. More violence followed, as Indonesian-backed militia groups launched a weeks-long campaign of terror that killed thousands before the arrival of an Australian-led peacekeeping force.

Vieira de Mello stepped into the crisis as the U.N. Transitional Administrator, governing the territory until 2002. Under his leadership, the U.N. built the political and bureaucratic infrastructure of a functioning state. In May 2002, Xanana Gusmão, the former leader of the anti-Indonesian resistance, was elected president of the new country, now named Timor-Leste.

What was the U.N. doing in Iraq in 2003?

The coalition-led invasion of Iraq in 2003 had been undertaken without U.N. Security Council authorization, but in May, following the fall of Saddam Hussein’s regime, the Council passed Resolution 1483, which granted “retroactive legitimacy” to the occupation, while offering the U.N. an “ill-defined, subservient role,” according to Samantha Power, who served as U.S. ambassador to the U.N. under the Obama administration. Into that unprecedented situation the U.N. sent the then-United Nations High Commissioner for Human Rights, Vieira de Mello, installing him in a four-month appointment as U.N. Special Representative for Iraq.

Vieira de Mello and his team set up shop in the Canal Hotel in Baghdad, and the U.N. official began speaking to a host of influential Iraqis, including shiite leader Grand Ayatollah Ali al-Sistani, who had been unwilling to speak with the coalition leadership. He sought to influence Paul Bremer, the leader of the Coalition Provisional Authority, urging him to publicize a plan for elections and limit the purge of Baath party members to high-level officials, rather than hollowing out the Iraqi civil service.

On August 19, 2003, terrorists acting under orders from Abu Musab al-Zarqawi, Al Qaeda’s leader in Iraq, exploded a truck bomb outside the Canal Hotel, collapsing a section of the building and trapping Vieira de Mello in rubble. Rescue efforts were severely hampered by a lack of critical equipment, and hours later, still trapped, Vieira de Mello died, one of nearly two-dozen victims of the attack.

What happened to the mission to Iraq?

Following the bombing, then-U.N. Secretary General Kofi Annan pledged to continue the Iraqi mission, saying of the victims, “The least we owe them is to ensure that their deaths have not been in vain.” But weeks later, another bombing forced the U.N. to pull out of Iraq entirely.

How has Sergio Vieira de Mello been remembered?

At a memorial service for Vieira de Mello in Rio De Janeiro, Annan said that the diplomat had “entered that Pantheon of heroes that the United Nations wishes it did not have.” President Gusmao of Timor Leste said, “The people of East Timor have lost an extraordinary friend. His death is a terrible blow for humanity, for all those who strive for the entire international community.”

Spotlight Story

U.S. Health Care Workers Are Dangerously Ill-Equipped to Fight COVID-19

“We are out of everything.”

In 2008, Samantha Power published a biography of Vieira de Mello, Chasing the Flame. The book served as the basis for an HBO documentary, Sergio, also directed by Barker. On his decision to recast Vieira de Mello’s story a decade later in a new film, Barker has said he felt there was more left to tell. “There was an emotional component to his story that just spoke to me — a level of truthfulness and authenticity that I could only explore further through narrative film,” the director said in a statement for Netflix. “I couldn’t get Sergio’s story out of my head.”

Write to Alejandro de la Garza at Sergio” target=”_self” rel=”noopener noreferrer”>alejandro.delagarza@time.com.