PORTLAND, Maine (AP) — This election year is déjà vu for Sen. Susan Collins — the Maine Republican is running for reelection as Democrats pin their hopes on a new candidate to defeat her. Last time, it was state lawmaker Sara Gideon. This time, it’s combat veteran and oyster farmer Graham Platner.But Collins has proven to be a hard target for Democrats over the years — even for candidates without the baggage of Platner, who has faced criticism for his relationships with women, inflammatory online posts and a previous tattoo recognized as a Nazi symbol. Collins is seeking her sixth term with sky-high name recognition, a record-breaking run of consecutive Senate votes and a history of bringing back federal funding for her state for years. She is also the rare Republican who sometimes can boost her own popularity back home by keeping her distance from President Donald Trump, and she has perfected that delicate dance even as his tightening grip on the party has cost two of her Senate Republican colleagues their reelection.

Sens. John Cornyn of Texas and Bill Cassidy of Louisiana lost their primaries when facing Trump-endorsed opponents. But despite the president’s complaints about Collins, he did not campaign against her. Years of practice have made her adept at staying close — but not too close — to the president when it is politically advantageous, and moving away when showing an independent streak is helpful.