She roamed across deserts, loading camels with evening gowns and cutlery, slipping through ancient ruins like a spy and finding herself the lone woman at the center of a struggle that defined the borders and politics of a Middle East that has refused to be tamed by Western powers.

Gertrude Bell was heroine, archaeologist, feminist and map-maker. She spoke Persian and Arabic, was the confidant of a king and was famously unlucky in love. The daughter of a British industrialist, her wanderings through Syria and Iraq in the early 1900s were as vital to deciphering the region as those of her more celebrated male counterpart T.E. Lawrence, better known as Lawrence of Arabia.

A new film, “Letters from Baghdad,” explores the complexities of a character who was at once graceful and arrogant, erudite and earthen. The documentary is based on letters and communiqués — Tilda Swinton is the voice of Bell — that follow her from the aristocracy and drizzle of Yorkshire, England, to the scoured, arid expanses of tribesmen, Bedouins and sheikhs. Bell called the Middle East “my second native country.”

Insights from her years of travel helped shape the boundaries of Iraq after World War I and the fall of the Ottoman Empire. That Iraq, with its uneasy balance of Kurds, Sunnis and Shiites, has confounded the West for decades, including two American-led wars, and the rise of ISIS, which today threatens stability from Cairo to Damascus to Dubai. Bell was prophetic on the conflicting allegiances and dangers of Western intervention in lands that were rooted in clan customs and knew little of democracy.

“We don’t know exactly what we intend to be in this country. We rushed into this business with our usual disregard for a comprehensive politics scheme,” she said of the British occupation of Iraq in the early 1920s. “Can you persuade people to take your side when you’re not sure if in the end whether you’ll be there to take theirs?”

Such sentiments have echoed through hundreds of thousands of deaths and trillions of dollars in damage, weapons and other costs since the U.S. invaded Iraq in 2003. But “Letters from Baghdad” takes us on a journey before all that. Directed by Zeva Oelbaum and Sabine Krayenbuhl the film elegantly unfolds as if someone had peeked inside a steerage trunk and thumbed through the brittle pages of scrapbooks showing sailboats on the Euphrates and hieroglyphics in the moonlight.

“I have cut the thread,” Bell wrote as she vanished once again into the desert. “You will find me a savage for I’ve seen and heard strange things and they color the mind.”

The only woman diplomat at the 1919 Paris Peace Conference, Bell was a curiosity in a political world dominated by men. The Ottoman Empire marked her as a spy; some of her British colleagues viewed her with suspicion and grudging admiration. Lawrence said of her: “A wonderful person, not very much like a woman, you know. … She was born too gifted perhaps.” A British newspaper headline said Bell “Explored in the Middle East ‘Like a Man.’”

She looks out from black-and-white photographs and film footage as privileged and restless; sharp nose, thin lips, pearls and cloche hats. She once hired 17 camels and traveled 1,500 miles. Her love life was just as arduous. A fiancé in Tehran died of illness and a married lieutenant colonel she adored was killed in the battle of Gallipoli. And eventually, even in the land she was most intimate with, her influence waned among onetime friend King Faisal and officials dispatched by the British foreign office.

“Letters from Baghdad” reaffirms Bell’s legacy as pivotal in the West’s understanding of the Middle East. It is a vivid, if sober, counterbalance to Werner Herzog’s poorly reviewed “Queen of the Desert,” starring Nicole Kidman as Bell. In an age of a rebooted “Wonder Woman,” Bell is the real thing, intrepid, fierce and smart.

A writer and archaeologist, respected by sheikhs, Bell helped found the National Museum of Iraq (ransacked and looted during the war in 2003). She struggled with “black depression” and reportedly died of an overdose of sleeping pills in 1926, at the age of 57. She left behind the contours of a new nation and at least, as one friend put it, “25 pairs of expensive shoes.”