A. Donald McEachin, center, a Democratic state senator from Richmond who was recently elected to the House of Representatives, gets directions from a staffer on procuring a parking pass as he prepares for his congressional stint on Dec. 1. (Bill O'Leary/The Washington Post)

A. Donald McEachin has the third-worst office on Capitol Hill — and he couldn’t be happier.

The newly elected representative from Virginia fared poorly in the lottery for congressional office space last week, drawing number 48 out of 50. There’s nothing glamorous or even desirable about the cramped room on the third floor of the Rayburn House Office Building that McEachin will call his own.

But that didn’t dampen the spirits of the third-ever African American to represent the Old Dominion in the House of Representatives.

“Any office is better than the office that your opponent got,” chirped McEachin, 55, a former state senator, who was so dazzled by his first official visit to the Capitol that he alternated between high-fiving his fellow freshmen and tearing up.

He joins the House after Democrats took a shellacking nationally. Republicans control both chambers of Congress, and Republican Donald Trump is preparing to move into the White House.

But as his party scrambles to find its way, McEachin said it would be a mistake to retreat from its emphasis on diversity.

If the outcome was an “adverse reaction to browning, blackening and gaying of America,” he said, “then there’s nothing I can do about that. We are the party of inclusion.”

McEachin was elected from a newly drawn district that runs from Richmond and its suburbs south to rural counties along the North Carolina border. A panel of federal judges set the boundaries of the formerly Republican district after ruling that the old design illegally packed African American voters into the neighboring congressional district, diluting their ability to influence elections elsewhere.

His election marks the first time two African Americans have represented Virginia at the same time — a bit of trivia that pleases McEachin but he says doesn’t define him. “This should be accepted as commonplace and not extraordinary,” he said.

McEachin said he does not want to be pigeonholed as someone primarily concerned with police shootings and voting rights. “I am certainly not ashamed of the civil rights heritage that I carry,” he said. “But I’d like to believe there are additional aspects to my service that will also be found valuable.”

He campaigned on the need to address climate change, expand rural broadband and extend the time members of the military spend at home between deployments as well as improve the Department of Veterans Affairs.

House Minority Whip Steny H. Hoyer (D-Md.) tapped McEachin to be a regional whip, which requires him to know the positions of lawmakers in Virginia, Maryland, Delaware and New Jersey. “He’s sort of a big teddy bear of a man,” Hoyer said. “What a wonderful smile and great welcoming personality.”

A trial lawyer, husband to a Richmond prosecutor and father of three grown children, McEachin knows how to wield his 6-foot-5-inch frame to comfort or cajole. At once goofy and cerebral, McEachin, 55, is a Star Trek fanatic who hails fellow freshmen with a “Hey, man.”

An Army brat born in Germany, he was a teenager when he became a delegate for Edward M. Kennedy’s failed presidential campaign at the 1980 Democratic national convention. He studied political science at American University before earning his law degree at University of Virginia.

Rep. James E. Clyburn (D-S.C.), House assistant Democratic leader, predicted McEachin would have a long career in the House, long enough to perhaps see Democrats regain control.

“He’s young enough to benefit from the pendulum swing,” said Clyburn, who attended McEachin’s wedding almost 30 years ago. “The pendulum, in my opinion, is already moving back to the left.”

To advance his political career, McEachin unseated a string of vulnerable fellow Democrats.

After three terms, McEachin ran for attorney general and lost badly. The defeat stung, and he found himself struggling to find a purpose. Then one day at church, he had an epiphany and decided to rededicate himself to using the levers of government to help people.

Talking about that moment as he sat in a subterranean cafeteria filled with the chatter of young staffers last week, McEachin’s chin quivered and his eyes filled with tears.

He enrolled in seminary at Virginia Union University, became an ordained Baptist minister and then ran for office and was returned to the House of Delegates.

In 2007, McEachin made a bid for the Virginia Senate, taking on 30-year incumbent state Sen. Benjamin J. Lambert III, an African American lawmaker weakened by his endorsement of Republican George Allen for the U.S. Senate over Democrat Jim Webb. The race split Richmond’s black community, but McEachin won by 15 percentage points.

A few years later, he faced the greatest test of his faith when he was diagnosed with rectal cancer. “I was mad as fire,” he said, wiping away tears.

But soon he understood the meaning of a premonition he had one night on a long solo walk. He was convinced that he would face struggle, but God would take care of him. Three years later, he was cancer-free.

He turned the experience into a sermon for his Ebenezer Baptist Church congregation in Hanover and a renewed zeal for Medicaid expansion under the Affordable Care Act, which the GOP-controlled legislature has blocked.

As caucus chair, McEachin was at the center of negotiations over a bill that freed Dominion Virginia Power from financial audits and protected the utility giant from having to reduce rates.

The company, the biggest corporate donor to Virginia politicians, gave $107,272 to McEachin over the course of his career, according to data compiled by the nonpartisan Virginia Public Access Project.

Lobbyists for Dominion Virginia Power said they had the votes to win but were unsure whether Gov. Terry McAuliffe (D) would sign it. McEachin persuaded Dominion to increase its solar investments, giving Senate Democrats political cover to support it and handing Dominion a veto-proof majority.

In his race for Congress, McEachin defeated Henrico Sheriff Mike Wade in a campaign that had one sharp moment.

“The only part that upset me was when he tried to make me look like I was a racist,” Republican Wade said.

During a debate over police brutality, Wade said most African Americans shot by police are already “on the way to jail” and suffer from a mental illness or substance abuse.

A stunned McEachin recalled a night he was stopped by police looking for a suspect whose car did not match McEachin’s vehicle. “When I got pulled over . . . I didn’t have a mental health problem, and I wasn’t on my way to jail,” he said.

He still offered Wade tickets to the inauguration.

Back at the office lottery in the Capitol, McEachin chose among three remaining offices that were cramped, inconvenient or a long walk from the House floor.

He joked with the stern superintendent of House office buildings that he would prefer to occupy the spacious and soon-to-be-vacant office of Rep. Xavier Becerra, a California Democrat who is resigning to serve as his state’s attorney general.

“So I want to select [his office],” he said. It didn’t work, but McEachin didn’t care.

He raced up to his new digs and unwittingly barged in on the staff of a Kentucky Republican who is vacating the office. Then he bounded off to select his carpets and drapes.

“We’ll have our bad days,” he said, “but this is the place to be.”