Magnolia Pictures has acquired worldwide rights to “The Final Year,” a behind-the-scenes look at Barack Obama’s foreign policy team, Variety has learned. The HBO documentary was directed by Greg Barker. It unfolds during the 44th president’s last year in office, following America’s top diplomats and political advisors as they grapple with the rise of ISIS, try to hammer out a nuclear deal with Iran, and attempt to bring attention to the issue of global warming. The film profiles several key members of Obama’s staff, including Secretary of State John Kerry, U.S. Ambassador to the United Nations Samantha Power, Deputy National Security Adviser and presidential confidant Ben Rhodes, National Security Adviser Susan Rice, and President Obama himself.

The movie had its world premiere at the Toronto International Film Festival before screening at the BFI London Film Festival. It will next show as the opening night selection of DOC NYC on Nov. 9. Magnolia plans to launch a multi-city theatrical release on Jan. 19th, 2018 — the anniversary of the presidential inauguration. That’s likely something of a painful memory for the people profiled in the film, most of whom were astounded by President Donald Trump’s White House victory (they’re often seen reassuring worried allies about “the Donald”). HBO will debut “The Final Year” on the network in the second quarter of 2018.

“Many television series and films have attempted to capture the triumphs and failures that occur daily within the West Wing, but none have taken as humanistic an approach as ‘The Final Year,'” said Magnolia president Eamonn Bowles in a statement. “Greg Barker has crafted an essential, fly-on-the-wall account of one of the most consequential years of any presidential administration.”

Barker has previously pulled back the curtain on the inner workings of government in “Manhunt: The Inside Story of the Hunt for Bin Laden,” a look at the CIA’s pursuit of the terrorist leader, and “Sergio,” the story of United Nations High Commissioner for Human Rights Sergio Vieira de Mello.

“In many ways this has been the most rewarding film of my career,” Barker said. “To have managed to secure an inside view of the true machinery of the American foreign policy machine was both a privilege and a responsibility, and to see audiences both inspired and moved by ‘The Final Year’ makes that journey all the more worthwhile and gratifying.”

The film was produced by Julie Goldman, John Battsek, and Barker. Production companies are Passion Pictures and Motto Pictures.

“We as filmmakers have always wanted the widest possible release for this film and we are thrilled that HBO has given us this opportunity and can think of no better partner than Magnolia in the U.S.,” Goldman and Battsek said.

The deal was negotiated by Magnolia co-exec VP Dori Begley and Magnolia senior VP of acquisitions John Von Thaden, with Josh Braun of Submarine on behalf of the filmmakers. Financial terms of the sale were not disclosed. Magnolia Pictures International will be handling sales outside of the U.S.