Housing and Urban Development Secretary Ben Carson toured a renovated department store here along with the local Republican congressman, who is fighting to keep his seat.

An imperiled House member in a Kansas City suburb took Transportation Secretary Elaine Chao on a bus tour of a traffic-choked highway she pledged to expand.

And another Republican in a tight race for reelection, who has kept his distance from President Trump, twice welcomed Agriculture Secretary Sonny Perdue and the acting head of the Environmental Protection Agency to his Iowa district to talk up pro-farmer policies.

The recent visits all served the secretaries’ official duties, highlighting projects supported with federal dollars. But they had something else in common: opportunities for House Republicans locked in nail-biter reelection contests to appear in photo-ops with members of Trump’s Cabinet.

In the run-up to the midterm elections, Trump administration officials have been turning up in swing districts, not as stand-ins for the president but as under-the-radar emissaries to places where Trump is divisive. They’re able to enter what is essentially Trump’s no-fly zone, offering a softer pitch that could nevertheless serve as a lifeline for vulnerable Republicans.

Other presidents have deployed their government leaders as midterm campaign surrogates. But the election-season appearances by Trump’s Cabinet — coordinated in conjunction with the White House — have been more frequent, according to GOP strategists and former Obama administration officials. And they’ve raised concerns that the secretaries’ stopovers could violate the law prohibiting government officials from engaging in partisan activity.

Eckert’s Inc. President Chris Eckert, right, shows U.S. Agriculture Secretary Sonny Perdue, left, and U.S. Rep. Mike Bost (R-Ill.) around the Country Store in Belleville. (Karen Binder/AgriNews Publications)

Several Cabinet offices said they were not authorized to discuss the trips or the White House strategy behind them, or did not return phone calls. They declined to provide The Washington Post with the secretaries’ travel schedules. Multiple lawmakers’ offices also did not respond to requests for interviews.

“The Cabinet is going to communities all over the country where the President’s policies are working and making a difference,” Jessica Ditto, a White House spokeswoman, said in an email.

From June 1 through Oct. 25, Cabinet members made more than 40 visits to GOP House districts and staged appearances with a handful of swing-state senators and candidates for governor, an analysis of their Twitter feeds and those of the lawmakers shows.

The stops represent the majority of their official appearances with lawmakers outside Washington this campaign season, the analysis shows. Those logging the most miles are Perdue, Carson, Chao, Energy Secretary Rick Perry, acting EPA chief Andrew Wheeler and Interior Secretary Ryan Zinke.

But the number of visits is likely much higher, as not every one was documented on Twitter. In August alone, Cabinet members and senior staffers — including presidential daughter Ivanka Trump — had made 35 trips to key House districts, an administration official told reporters in a late-summer conference call, noting that they were official events.

For a White House known for chaos, the strategy is surprisingly disciplined, former Virginia GOP congressman Tom Davis said. “They don’t always run a disciplined shop in other ways so you didn’t expect it out of these folks, but the [midterm] organization is impressive.”

It’s legal for the Cabinet to play a dual role as agency head and reelection booster, as long as they adhere to the federal Hatch Act, which bans the use of official ­taxpayer-funded resources for politicking.

Officially, Trump officials are on the kind of government business that’s part of the job. There was the town hall meeting with Perdue in Champaign, Ill., and the Energy Cybersecurity forum with Perry at the University of Texas. There was a ribbon cutting with Chao for a grant for carpool lanes in Santa Clarita, Calif., and a dedication ceremony with Zinke for a new national monument in Kentucky.

The secretaries also have talked up the fight against opioids or regulations the administration has rolled back for businesses.

Unofficially, though, they’ve stepped into an indispensable campaign role that’s accelerated as Election Day approaches. The appearances just happened to coincide with important priorities of endangered incumbents in Champaign (Rep. Rodney Davis), San Antonio (Rep. Will Hurd), Santa Clarita (Rep. Steve Knight), and Nicholasville, Ky. (Rep. Garland “Andy” Barr).

“You’ve got a grant to announce, a program to unveil,” said Michael Steele, a former Republican National Committee chairman. “You just happen to do it in a district with a member who’s up for reelection.”

“It’s a smaller circle of recognition than when the president or vice president shows up,” Steele said of the Cabinet visits, “but the benefit is huge. The word on the street is that the congressman brought Secretary So-and-So to the district.”

On her trip to Overland Park outside of Kansas City in mid-
October, Chao praised Rep. Kevin Yoder as an “unwavering champion” for his district’s road needs, according to local media reports. Then he tweeted, “ICYMI: @USDOT @SecElaineChao visited the Third District yesterday to discuss some of the critical infrastructure needs in our community,” and directed readers to a YouTube video of local television coverage.

These are not filled-to-the-
rafters rallies like the president’s, but the opposite: local events designed for local media exposure. When Carson and Rep. Mike Bishop (R-Mich.) toured the Knapp Centre apartments in Michigan’s state capital in October, no members of the public were on hand. National reporters were not notified.

A few employees of a tech services company in the mixed-use building came out of their offices to say hello, as Carson, with the congressman tagging behind, made his way to the roof for photos and a brief availability with a half-dozen radio and television reporters.

“Anyone would love living here!” the secretary beamed, calling the project an example of the private-public partnerships at the core of an effort to revitalize cities like Lansing.

The event felt manufactured, though, partly because the Knapp Centre was renovated by the Obama administration and opened in 2014.

Asked to describe the benefit of Carson’s visit to his reelection campaign, Bishop denied there was a political element. It’s “all about Lansing. . . . It has nothing to do with any kind of campaign,” he said.

Bishop tweeted a few hours later: “I joined @SecretaryCarson in Lansing to tour the revitalized Knapp Centre Apartments and discuss #OpportunityZones. Created as part of the #TaxCutsAndJobsAct, there are 250+ Zones in Michigan and they have a unique and exciting potential to spur investment across our state.”

Experts say the visits allow candidates to showcase the kinds of federal services that may boost their stock with suburban and moderate Republicans, even as Trump himself carries a more ­anti-government message at his rallies in more friendly territory.

“Their messaging is important for Republicans in areas where Trump has lost support,” said David Wasserman, House editor of the nonpartisan Cook Political Report, which tracks political races.

Perdue, for example, has tiptoed around Trump trade policies that have angered farmers in rural America, talking up ethanol and the White House rescue plan and asking them to give the administration time to confront China on tariffs.

Some lawmakers have welcomed multiple Cabinet secretaries. Barr got a visit from Wheeler on Aug. 24 to announce the Affordable Clean Energy Rule, another from Chao the same day with city leaders in Lexington, Ky., and was on hand last Sunday when Zinke dedicated a 380-acre national monument at Camp Nelson to honor African Americans’ role as soldiers during the Civil War.

U.S. Housing and Urban Development Secretary Ben Carson and U.S. Rep. Mike Bishop (R-Mich.), center, speak with Mark Clouse, the Eyde Company's chief financial officer and general counsel, during a tour of the Knapp's Centre in downtown Lansing on Oct. 4, 2018. (Beth LeBlanc/Beth LeBlanc/the Detroit News)

Some former Obama administration officials said they reduced these trips to competitive districts during campaign season to avoid the perception that they were mixing official with political travel — and keep from inadvertently violating the law.

“It wasn’t as if we never traveled, but I would say or my team would say, even in being responsive to a request, ‘It’s a close race very close to the election, we probably shouldn’t go,’ ” said Shaun Donovan, who was HUD secretary and budget chief under President Barack Obama.

As Chris Lu, who oversaw Cabinet affairs for the Obama White House, put it, “Even when you’re trying to do the right thing, it can cause problems.”

Still, under Obama, former HUD secretary Julián Castro got in trouble for endorsing Hillary Clinton in an interview. Obama’s Health and Human Services secretary Kathleen Sebelius similarly violated the law at a campaign gala for a North Carolina candidate for governor.

This midterm season, a few Trump secretaries appear to have come close to similar missteps, experts in the law say. After a tour of a family farm last week in Belleville, Ill., where Rep. Mike Bost is in a too-close-to-call race, Perdue praised the congressman to a group of farmers and state agriculture officials gathered for a town hall meeting, saying it was good to have someone in the House who could “bring the perspective of working folk” to the Capitol.

The Project on Government Oversight (POGO) filed a complaint Thursday with the special counsel’s office, which oversees Hatch Act compliance, suggesting Perdue may have improperly promoted Bost’s campaign.

Perdue spokesman Tim Murtaugh, in a statement issued Thursday, said the secretary “participated in town hall-style meetings” in Illinois “at the invitation” of the congressman “as part of his official duties as Secretary of Agriculture.”

The overall visits also prompted a complaint from Citizens for Responsibility and Ethics in Washington (CREW), a Washington-based ethics group alleging potential violations of the Hatch Act.

Office of Special Counsel spokesman Zachary Kurz said the office received it but would not say if an investigation is underway.