WASHINGTON — U.S. Labor Secretary Thomas E. Perez said Thursday he is running to be chairman of the Democratic National Committee, a decision that appeared to take him out of the mix of potential candidates for the Maryland governor's race in 2018.

Perez, a Takoma Park resident and former Maryland state official, would be tasked with countering Republican President-elect Donald Trump's message and rebuilding a party still stunned by Hillary Clinton's loss if he is chosen for the job by fellow Democrats.

“This is one of those ‘where were ya?' moments in our nation's journey to form a more perfect union,” Perez, 55, said on a call with state party chairs. “We're really in a battle for the heart and soul of our nation.”

If Perez wins the party's internal election in February, it presumably would keep him from entering the governor's race in 2018. Several Democrats, including Perez, have been seen as eyeing a challenge to incumbent Republican Gov. Larry Hogan.

Maryland Democratic Party Chairman Bruce Poole said he cringed a bit when he learned Perez would seek the chairmanship, because he believes Perez would have made a good candidate in Maryland. That said, Poole is backing Perez for the DNC.

“I just feel overwhelmingly that Tom's the guy that's going to get us winning,” Poole said. “He does an outstanding job. He's smart. More than anything, he is a street fighter.”

Perez, who was narrowly confirmed as labor secretary in 2013 over Republican objections, will face Rep. Keith Ellison of Minnesota in the race for party leader. Democratic state party chairs in South Carolina and New Hampshire also are running.

Ellison, the first Muslim elected to Congress, is tied closely to the party's progressive wing. He already has won endorsements from influential labor groups, including the American Federation of Teachers and the AFL-CIO.

“We have shown the path to success in Minnesota, where organizing has made the difference in winning elections up and down the ballot,” Ellison said in a statement welcoming Perez to the race. “We can do the same thing nationwide if Democrats mobilize working Americans across the country.”

Asked Thursday whether the DNC job would preclude his running for governor, Perez appeared to rule out a run for statewide office. He described the DNC chairmanship as a “full-time job” and said the party needs to “have someone committed here for the long haul.”

Several Democrats are considering a run for governor in Maryland, banking on the hope that Hogan's 2014 win in a blue state was a fluke. Baltimore County Executive Kevin Kamenetz, who is term-limited, and Del. Maggie McIntosh of Baltimore have said they are looking at the race.

Speculation also has focused on Rep. John Delaney of Montgomery County and Prince George's County Executive Rushern L. Baker III.

But Hogan's favorability in polling has been substantial, even in Democratic strongholds like Baltimore City. So for a Democrat, running for governor in Maryland would mean topping a crowded and likely expensive primary, and then facing a popular centrist Republican in the general election.

None of the Democrats currently being discussed, including Perez, are well known beyond their own geographic base.

There is far less drama for Republicans. Trump is backing Michigan Republican Party Chairwoman Ronna Romney McDaniel to lead the Republican National Committee. While party members will vote for the next chair, Trump's endorsement is expected to hold considerable sway.

Perez, a Buffalo, N.Y., native and the son of Dominican immigrants, is among the most liberal members of President Barack Obama's administration. Under his guidance, the Labor Department has approved a number of controversial regulations, such as extending overtime pay to millions of Americans and requiring financial advisers to operate in their clients' best interests.

State Sen. Michael J. Hough of Frederick County, a Republican, said he'd be happy if Democrats pick Perez. Choosing someone from one of the most Democratic counties in one of the most Democratic states in the nation, he said, would help Republicans.

“It's just seems laughable to me,” Hough said. “This is the guy who is going to appeal to blue-collar, union, gun-owning Democrats?”

Perez was seen as a potential running mate for Clinton's presidential campaign this year, a job that ultimately went to Virginia Sen. Tim Kaine. The former head of the Civil Rights Division of the Justice Department, Perez also was considered a possible candidate for attorney general had Clinton won.

Democratic officials said Perez is well-positioned to bridge the gap between liberal members of the party who supported Sen. Bernie Sanders of Vermont and its establishment. Perez is well-liked in the labor movement, but also backed Obama's pending Pacific Rim trade deal — a proposal that became anathema to progressives and union leaders.

“While he's known as a progressive, he's known as a progressive who gets along with the establishment,” said Mike Morrill, a Democratic strategist.

Perez, a former Montgomery County Council president, ran for Maryland attorney general in 2006 but was knocked off the ballot by the state's Court of Appeals, which held he lacked the 10 years of legal experience required by the Maryland Constitution. Douglas F. Gansler was elected to the post instead.

His father, a doctor, died of a heart attack when Perez was 12 years old. He put himself through college with scholarships and jobs as a trash collector and as a warehouseman.

Former Maryland Gov. Martin O'Malley, who briefly flirted with running for the DNC chairmanship himself this year after an unsuccessful presidential campaign, chose Perez to serve as the secretary of the Maryland Department of Labor, Licensing and Regulation, a job he held from 2007 until 2009.

“He's been an outstanding labor secretary, and I think he would represent us extremely well,” said Yvette Lewis, a former Maryland Democratic Party chairwoman and current DNC member.

john.fritze@baltsun.com

twitter.com/jfritze