Dick Cheney always saw doomsday threats from America’s enemies. His daughter is in a lonely battle against what both see as a danger to American democracy: Donald J. Trump.CASPER, Wyo. — Representative Liz Cheney was holed up in a secure undisclosed location of the Dick Cheney Federal Building, recounting how she got an alarmed phone call from her father on Jan. 6.Ms. Cheney, Republican of Wyoming, recalled that she had been preparing to speak on the House floor in support of certifying Joseph R. Biden Jr.’s election as president. Mr. Cheney, the former vice president and his daughter’s closest political adviser, consulted with her on most days, but this time was calling as a worried parent.He had seen President Donald J. Trump on television at a rally that morning vow to get rid of “the Liz Cheneys of the world.” Her floor speech could inflame tensions, he told her, and he feared for her safety. Was she sure she wanted to go ahead?“Absolutely,” she told her father. “Nothing could be more important.”Minutes later, Mr. Trump’s supporters breached the entrance, House members evacuated and the political future of Ms. Cheney, who never delivered her speech, was suddenly scrambled. Her promising rise in the House, which friends say the former vice president had been enthusiastically invested in and hoped might culminate in the speaker’s office, had been replaced with a very different mission.“This is about being able to tell your kids that you stood up and did the right thing,” she said.Ms. Cheney entered Congress in 2017, and her lineage always ensured her a conspicuous profile, although not in the way it has since blown up. Her campaign to defeat the “ongoing threat” and “fundamental toxicity of a president who lost” has landed one of the most conservative House members in the most un-Cheney-like position of resistance leader and Republican outcast. Ms. Cheney has vowed to be a counterforce, no matter how lonely that pursuit might be or where it might lead, including a possible primary challenge to Mr. Trump if he runs for president in 2024, a prospect she has not ruled out.Ms. Cheney, with her establishment background and partisan instincts, was seen as a possible speaker after her election to the House. Amr Alfiky/The New York TimesBeyond the daunting politics, Ms. Cheney’s predicament is also a father-daughter story, rife with dynastic echoes and ironies. An unapologetic Prince of Darkness figure throughout his career, Mr. Cheney was always attuned to doomsday scenarios and existential threats he saw posed by America’s enemies, whether from Russia during the Cold War, Saddam Hussein after the Sept. 11 attacks, or the general menace of tyrants and terrorists.Ms. Cheney has come to view the current circumstances with Mr. Trump in the same apocalyptic terms. The difference is that today’s threat resides inside the party in which her family has been royalty for nearly half a century.“He is just deeply troubled for the country about what we watched President Trump do,” Ms. Cheney said of her father. “He’s a student of history. He’s a student of the presidency. He knows the gravity of those jobs, and as he’s watched these events unfold, certainly he’s been appalled.”On the day last month that Ms. Cheney’s House colleagues ousted her as the third-ranking Republican over her condemnations of Mr. Trump, she invited an old family friend, the photographer David Hume Kennerly, to record her movements for posterity. After work, they repaired to her parents’ home in McLean, Va., to commiserate over wine and a steak dinner.“There was maybe a little bit of post-mortem, but it didn’t feel like a wake,” said Mr. Kennerly, the official photographer for President Gerald R. Ford while Mr. Cheney was White House chief of staff. “Mostly, I got a real sense at that dinner of two parents who were extremely proud of their kid and wanted to be there for her at the end of a bad day.”Mr. Cheney declined to be interviewed for this article, but provided a statement: “As a father, I am enormously proud of my daughter. As an American, I am deeply grateful to her for defending our Constitution and the rule of law.”The Cheneys are a private and insular brood, though not without tensions that have gone public. Ms. Cheney’s opposition to same-sex marriage during a brief Senate campaign in 2013 enraged her sister, Mary Cheney, and Mary’s longtime partner, Heather Poe. It was conspicuous, then, when Mary conveyed full support for her sister after Jan. 6.“As many people know, Liz and I have definitely had our differences over the years,” she wrote in a Facebook post on Jan. 7. “But I am very proud of how she handled herself during the fight over the Electoral College…Good job Big Sister.’’Ms. Cheney with her father after the vice presidential debate in 2004. Mr. Cheney has long been her closest professional alter ego.Jim Wilson/The New York TimesHer Father’s Alter EgoIn an interview in Casper, Ms. Cheney, 54, spoke in urgent, clipped cadences in an unmarked conference room of the Dick Cheney Federal Building, one of many places that carry her family name in the nation’s least populous and most Trump-loving state. Her disposition conveyed both determination and worry, and also a sense of someone who had endured an embattled stretch.Ms. Cheney had spent much of a recent congressional recess in Wyoming and yet was rarely seen in public. The appearances she did make — a visit to the Chamber of Commerce in Casper, a hospital opening (with her father) in Star Valley — were barely publicized beforehand, in large part for security concerns. She has received a stream of death threats, common menaces among high-profile critics of Mr. Trump, and is now surrounded by a newly deployed detail of plainclothes, ear-pieced agents.Her campaign spent $58,000 on security from January to March, including three former Secret Service officers, according to documents filed with the Federal Election Commission. Ms. Cheney was recently assigned protection from the Capitol Police, an unusual measure for a House member not in a leadership position. The fortress aura around Ms. Cheney is reminiscent of the “secure undisclosed location” of her father in the days after the Sept. 11 attacks.Ms. Cheney’s temperament bears the imprint of both parents, especially her mother, Lynne Cheney, a conservative scholar and commentator who is far more extroverted than her husband. But Mr. Cheney has long been his eldest daughter’s closest professional alter ego, especially after he left office in 2009, and Ms. Cheney devoted marathon sessions to collaborating on his memoir, “In My Times.” Their work coincided with some of Mr. Cheney’s gravest heart conditions, including a period in 2010 when he was near death.His health stabilized after doctors installed a blood-pumping device that kept him alive and allowed him to travel. This included trips between Virginia and Wyoming in which Mr. Cheney would drive while dictating stories to Ms. Cheney in the passenger seat, who would type his words into a laptop. He received his heart transplant in 2012.Mr. Cheney, left, served as Wyoming’s at-large congressman from 1979 to 1989. As powerful as he was as vice president, he had always considered himself a product of the House.George Tames/The New York TimesFather and daughter promoted the memoir in joint appearances, with Ms. Cheney interviewing her father in venues around the country. “She was basically there with her dad to ease his re-entry back to health on the public stage,” said former Senator Alan K. Simpson, a Wyoming Republican and a longtime family friend.By 2016, Ms. Cheney had been elected to Congress and quickly rose to become the third-ranking Republican, a post her father also held. As powerful as Mr. Cheney was as vice president, he had always considered himself a product of the House, where he had served as Wyoming’s at-large congressman from 1979 to 1989.Neither father nor daughter is a natural politician in any traditional sense. Mr. Cheney was a plotter and bureaucratic brawler, ambitious but in a quiet, secretive and, to many eyes, devious way. Ms. Cheney was largely focused on strategic planning and hawkish policymaking.After graduating from Colorado College (“The Evolution of Presidential War Powers” was her senior thesis), Ms. Cheney worked at the State Department and the United States Agency for International Development while her father was defense secretary. She attended the University of Chicago Law School and practiced at the firm White & Case before returning to the State Department while her father was vice president. She was not sheepish or dispassionate like her father — she was a cheerleader at McLean High School — but held off running for office until well into her 40s.Once in the House, Ms. Cheney was seen as a possible speaker — a hybrid of establishment background, hard-line conservatism and partisan instincts. While she had reservations about Mr. Trump, she was selective with her critiques and voted with him 93 percent of time and against his first impeachment.As for Mr. Cheney, his distress over the Trump administration was initially focused on foreign policy, though he eventually came to view the 45th president’s performance overall as abysmal.“I had a couple of conversations with the vice president last summer where he was really deeply troubled,” said Eric S. Edelman, a former American ambassador to Turkey, a Pentagon official in the George W. Bush administration and family friend.People protesting Ms. Cheney’s decision to impeach President Donald J. Trump this year at Wyoming’s Capitol in Cheyenne.Daniel Brenner for The New York TimesAs a transplant recipient whose compromised immune system placed him at severe risk of Covid-19, Mr. Cheney found that his contempt for the Trump White House only grew during the pandemic. He had also known and admired Dr. Anthony S. Fauci for many years.At the same time, Ms. Cheney publicly supported Dr. Fauci and seemed to be trolling the White House last June when she tweeted “Dick Cheney says WEAR A MASK” over a photograph of her father — looking every bit the stoic Westerner — sporting a face covering and cowboy hat (hashtag “#realmenwearmasks”).She has received notable support in her otherwise lonely efforts from a number of top-level figures of the Republican establishment, including many of her father’s old White House colleagues. Former President George W. Bush — through a spokesman — made a point of thanking Mr. Cheney “for his daughter’s service” in a call to his former vice president on his 80th birthday in January.Ms. Cheney did wind up voting for Mr. Trump in November, but came to regret it immediately. In her view, Mr. Trump’s conduct after the election went irreversibly beyond the pale. “For Liz, it was like, I just can’t do this anymore,” said former Representative Barbara Comstock, Republican of Virginia.A 2024 Run for President?Ms. Cheney returned last week to Washington, where she had minimal dealings with her former leadership cohorts and was less inhibited in sharing her dim view of certain Republican colleagues. On Tuesday, she slammed Representative Paul Gosar of Arizona for repeating “disgusting and despicable lies” about the actions of the Capitol Police on Jan. 6.“We’ve got people we’ve entrusted with the perpetuation of the Republic who don’t know what the rule of law is,” she said. “We probably need to do Constitution boot camps for newly sworn-in members of Congress. Clearly.”She said her main pursuit now involved teaching basic civics to voters who had been misinformed by Mr. Trump and other Republicans who should know better. “I’m not naïve about the education that has to go on here,” Ms. Cheney said. “This is dangerous. It’s not complicated. I think Trump has a plan.”Ms. Cheney voted for Mr. Trump’s agenda 93 percent of time and against his first impeachment in 2019.Stefani Reynolds for The New York TimesMs. Cheney’s own plan has been the object of considerable speculation. Although she was re-elected in 2020 by 44 percentage points, she faces a potentially treacherous path in 2022. Several Wyoming Republicans have already announced plans to mount primary challenges against Ms. Cheney, and her race is certain to be among the most closely followed in the country next year. It will also provide a visible platform for her campaign to ensure Mr. Trump “never again gets near the Oval Office” — an enterprise that could plausibly include a long-shot primary bid against him in 2024.Friends say that at a certain point, events — namely Jan. 6 — came to transcend any parochial political concerns for Ms. Cheney. “Maybe I’m being Pollyanna a little bit here, but I do think Liz is playing the long game,” said Matt Micheli, a Cheyenne lawyer and former chairman of the Wyoming Republican Party. Ms. Cheney has confirmed as much.“This is something that determines the nature of this Republic going forward,” she said. “So I really don’t know how long that takes.” More