Defense Secretary Pete Hegseth and the pro-Trump musician Kid Rock flew in military helicopters together on Monday, weeks after the Army came under scrutiny for a flyby at the singer’s home.

“Joined my friend @KidRock and some of our great @USArmy Apache pilots for a ride this morning,” Mr. Hegseth said in a post on X. “Kid Rock is a patriot and huge supporter of our troops.”

It came after Mr. Hegseth made an extraordinary move to shut down an Army investigation into military helicopters hovering outside the singer’s home in Nashville last month while on a training run nearby.

Videos the singer posted on X on March 28 show two Apache helicopters hovering feet away from a pool at his 27,000-square foot mansion, which he has dubbed The Southern White House. In the video, Kid Rock, whose real name is Robert James Ritchie, cheers and salutes the helicopters as they fly away.

The episode sparked fierce backlash and a military investigation, with President Trump himself remarking that the crew members “probably shouldn’t have been doing that.” At the time, a large “No Kings” rally, protesting Mr. Trump’s presidency, was taking place nearby.

The Army went on to bar the crews from flight duty and launched an investigation. But Mr. Hegseth, in a remarkable circumvention of the military chain of command, personally reversed the suspensions and shut down the inquiry.

“No punishments. No investigation. Carry on, patriots,” Mr. Hegseth said in a post on X.

In a statement, Sean Parnell, the Pentagon’s chief spokesman, said Kid Rock’s appearance in military helicopters on Monday was part of the ongoing preparations for America’s 250th birthday.

“The visit today provided an opportunity for Kid Rock to thank service members, highlight the professionalism of the men and women supporting the mission, and recognize their continued sacrifice in honor of our nation,” Mr. Parnell said. “The department is grateful for Kid Rock’s long time support of our troops.”