Rep. Will Hurd (R-Tex.) is one of two African Americans in the GOP caucus and one of only a few ex-CIA spies to make the move to Congress. (Andrew Harnik/For The Washington Post)

Rep. Will Hurd (R-Tex.) knows he has a complicated political identity that often confuses people: “The question I get asked most of the time is, ‘How did the black dude get elected in a Hispanic district?’ ”

Hurd, a freshman lawmaker whose district stretches for 800 miles along the Texas-Mexico border, is doubly exceptional as a member of the expanded House Republican majority. He’s one of just two African Americans in the caucus, and nearly 70 percent of his constituents are Latinos.

His upset victory in November surprised even the most optimistic Republican strategists. And it also gave the GOP, a party desperate for more minority faces, a potential new star who could help navigate the difficult demographic landscape that seems to be changing in ways that highlight Republican weaknesses.

This makes Hurd and his future political career a test case for Republicans. The party has done relatively well advancing Latino and African-American nominees for governor and senator — Republicans now have five such officials, Democrats just two — but the House GOP caucus has remained overwhelmingly white. Moreover, House Republicans have never been able to retain a black lawmaker in a true swing district for more than a couple terms, suggesting broad appeal across ideological and racial lines. The question is, could Hurd represent that future?

At 37, he has already carved out a life’s worth of experiences in his first career, serving nearly a decade in the Central Intelligence Agency, including dangerous undercover stints in hot spots such as Pakistan and Afghanistan.

Newly elected Rep. Will Hurd (R-Texas) speaks on the phone in his office on Capitol Hill. Hurd is a former CIA employee and is one of the two African Americans in the GOP caucus. (Andrew Harnik/For The Washington Post)

Hurd’s background in intelligence and national security, and the multicultural district he represents, will force him into national debates such as those on border security and immigration, raising his profile and setting the stage for a long career in Congress.

But there’s an equal chance that he will become a one-term wonder, a momentary flash of attention who loses reelection two years later. Democrats already have him atop their list of Republicans they expect to defeat in 2016, and the Democrat he ousted last year has declared that he will run again.

So, once more: “How did the black dude get elected in a Hispanic district?”

According to Democratic and Republican strategists, it was a perfect political storm: a Republican wave year, including a governor’s race at the top of the ticket in which the Democratic candidate bombed, combined with a set of issues breaking late (border security and international crises) that fit Hurd’s background. And it didn’t hurt that most of Hurd’s adult life remains classified, giving Democratic opponents little to work with in campaign ads.

Hurd tells it this way: “We did it by engaging people on the issues that they care about. Whether you’re Hispanic, black, white, you know, you care about putting food on your table, having a roof over your head and that the people around you that you love are healthy and happy,” Hurd said in an interview in his sparsely decorated office on Capitol Hill. “So we have to translate our agenda in a way that hits at those issues.”

Democrats have already telegraphed plans to portray Hurd as a generic Republican who supports fiscal policies that would cut funding for veterans, the poor and elderly.

“Will Hurd is one of the most vulnerable Republicans in the country, so he shouldn’t get too comfortable in Washington. It is clear that Congressman Hurd is yet another vote for the reckless Republican agenda,” said Tyrone Gayle, spokesman for the Democratic Congressional Campaign Committee.

It won’t be that easy making Hurd seem like the average anything.

Some of the stories he tells, or doesn’t, about his life seem straight from an episode of “Homeland” or “24.” Once, working undercover in an undisclosed South Asian nation, trying to meet someone who was trading secrets to the CIA, he entered what was supposed to be an empty alley for what was supposed to be a clandestine meeting.

“When I turned down the alley, it was like a parade and a couple thousand people in this alley,” he said. His Toyota Tercel ran over a woman’s foot; there was blood everywhere.

“I’ve got a thousand people on my car, banging on it, shaking it,” he said, until he finally decided to do something. Worried that he might not survive the encounter, he unfolded his 6-foot-4-inch body out of the car and stood up in the crowd. “So I said, ‘Does anybody speak English?’ This little guy parts the crowd, and he goes, ‘I speak the English.’ So I go, ‘Where’s the nearest hospital?’ ”

He fetched a rickshaw, gave the driver a bunch of cash and sent his victim and translator off to the hospital. “The crowd literally starts clapping, they’re patting me on the back, I get in the car, I’m driving off, I look in the rearview mirror and everybody’s waving. My heart is beating,” he said, pounding his chest for emphasis, “because I’m thinking my mom is about to get the call no mother wants to get.”

Hurd is one of a growing number of lawmakers who served in the nation’s post-Sept. 11 wars, but he is one of the very few ex-CIA agents to go to Congress. He is the only known CIA spy to move to the Capitol in the modern anti-terror-war posture, giving him a secondary constituency of clandestine operatives who toil in shadows.

“I’m excited to be up here representing the residents of the 23rd district of Texas, but I’m also up here representing those people that are willingly putting their lives on the line to protect us,” Hurd said.

Given their problems trying to attract minority voters, national Republicans have made Hurd’s success a priority for 2016 and beyond. “We’re looking for ways to diversify the Republican Party in terms of the electoral support, and to me, one of the most important ways to do that is to run more candidates who are Hispanic and African American and Asian,” Sen. John Cornyn (R-Tex.) said.

But finding candidates like Hurd can be very difficult. At Texas A&M University in the late 1990s, Hurd had no intention of going into politics. He stumbled into his spy career after taking a class with an old rumpled ex-CIA agent, leading to him train at agency headquarters in 2000 and 2001. After the Sept. 11 attacks, he was summoned to a new counterterrror unit.

“On Sept. 12, I was the fourth employee in that unit, that prosecuted the war in Afghanistan,” Hurd said.

The next nine-and-a-half years brought him to India, Pakistan, New York and Afghanistan — courting the enemy, he said: “My job was to recruit spies and steal secrets.”

He was involved in briefing members of Congress, many of whom, he said, could not distinguish the Sunni and Shia divide at the center of Islamic civil wars for centuries. That made Hurd want to pursue politics, leaving the agency in 2009 to help start a cybersecurity company. Now, as one of those members of Congress, his immediate focus is on his own home front, including helping guide the congressional delegation of fellow Rep. Michael McCaul (R-Tex.) on a tour last month of the Mexico border. Hurd also is fully engaged in an effort to raise a lot more reelection cash than the $1.4 million spent in his race last year.

“If we do our job, you know, we come up here and do what we said we’re going to do, all those other aspects are going to fall in line,” he said.