Sen. Richard G. Lugar (Ind.) will head into Tuesday’s Republican primary as the underdog to a conservative challenger, threatening to end his 36-year tenure not as his party’s elder statesman on foreign affairs but as an ousted moderate who had trouble explaining to voters where he lived.

Lugar, 80, will face Indiana state Treasurer Richard Mourdock, a career politician whose staunch conservatism could make him a more beatable opponent for the presumptive Democratic nominee, Rep. Joe Donnelly.

An independent bipartisan poll, conducted late last week, gave Mourdock a 10-point edge heading into the final days before the primary, and many insiders think that Lugar’s only chance for survival is by generating a large turnout of independent and Democratic voters in the Hoosier State’s open contest.

If Lugar loses, he will be the first incumbent senator defeated in a primary battle this election year, which has not experienced the sort of tea party uprisings that marked the 2010 midterm elections. First elected to the Senate in 1976 — he was Indianapolis mayor from 1968 to 1975 — Lugar shares with Sen. Orrin G. Hatch (Utah) the title of longest-serving Republican in the upper chamber.

Facing a similar rebellion that started brewing last year, Hatch ran an aggressive campaign in his state’s unusual caucus system and spent much of his energy reminding voters of the decades he has spent championing conservative causes. At his state party convention, Hatch received more than 59 percent of the vote and will now head into a full statewide GOP primary as a strong favorite.

In Indiana, the campaign has turned into a referendum on Lugar’s career as a bipartisan lawmaker at the top of the Foreign Relations and Agriculture committees. His opponent has focused, in part, on trips to overseas hot spots with Barack Obama when he was still in the Senate and served on the committee with Lugar.

“It’s time to retire Richard Lugar,” says the narrator of an ad for an outside group supporting Mourdock, which ends with a picture of Obama and Lugar acting chummy together at a Senate hearing, with the former fake punching the latter.

Painting Lugar as entrenched in Washington, Mourdock’s campaign received a major boost when Indiana media outlets began delving into the fact that Lugar sold his house shortly after he was sworn in. He has not formally lived in his home state for 35 years. He had difficulty explaining to a local TV reporter what address he uses for his driver’s license, and a legal battle ensued to determine whether the senator would be eligible to vote in his own primary election on Tuesday.

Eventually, the state attorney general ruled that Lugar could register at the 600-acre farm that he and his family run.

The episode played into Mourdock’s theme of campaigning as the outsider, allowing him to accuse Lugar of “going Washington.” Lugar has tried to use his experience and seniority as a counter-punch, touting his ability to help Indiana, as well as nations worldwide, with his senior spots on Senate committees.

“I believe I can make a significant difference in American foreign policy, [agriculture] policy and economic policy. I hope it’s not too grandiose a vision to say we have an opportunity to help people all over the world,” Lugar said during an interview in between campaign stops last month.

Outside groups have countered with a flood of advertising against the incumbent, citing his ties to Obama and his centrist votes on immigration and the Wall Street bailout. The National Rifle Association ran grainy pictures of Lugar standing next to Obama in an ad that announced that Lugar received an “F” from the gun-owners group.

“Dick Lugar has changed,” the narrator said.

A super PAC run by GOP establishment figures — including former senator Norm Coleman (Minn.), who served on the foreign relations panel with Lugar — spent nearly $650,000 in Lugar’s defense before pulling out of the state with 10 days to go.

Waiting on the side is Donnelly, a three-term congressman who hails from his party’s moderate wing. In a speech to the annual Jefferson-Jackson dinner of Indiana Democrats, Donnelly turned much of his focus to Mourdock, perhaps signaling his belief that he expects him to beat the incumbent. Donnelly noted that Mourdock, elected as state treasurer in 2006, joined a legal challenge to the bailout of the auto industry, an unsuccessful effort that made him a hero among conservatives, but that Democrats hope to use against him in the general election in the fall.

Mourdock has specifically said he does not want to go to Washington to make bipartisan deals, something Donnelly thinks is more necessary than ever.

“When we go to Washington, [we go] not just as Democrats or Republicans but as Americans who are committed to making our country a stronger and better place,” he said. “And that’s what we’re going to talk about throughout this Senate campaign. Who will fight for you?”