WASHINGTON — Jordan took a kick to his snout. Hurricane was slammed to the ground and repeatedly punched. Both were rushed to a veterinarian for treatment.

But by stopping a fence jumper from getting into the White House on Wednesday night, the two members of the Secret Service’s K-9 unit accomplished something that humans in the agency have been hard-pressed to do recently: They performed their duties flawlessly and, at least for a day, lifted the morale of a Secret Service that had been rocked by a series of embarrassing incidents.

What the dogs, both Belgian Malinois, did was stop a man who had managed to get over the fence at 1600 Pennsylvania Avenue at 7:15 p.m. Wednesday. The dogs, which can run 25 miles per hour and have a bite that applies hundreds of pounds of pressure per square inch, knocked the man to the ground, and bit him. As the man tried to fend the dogs off, officers moved in and arrested him.

The veterinarian determined that the dogs had sustained only minor injuries.

Jordan, a member of the Secret Service’s K-9 unit, and a colleague, Hurricane, stopped a White House intruder Wednesday night.CreditU.S. Secret Service

“All that’s hurt on the dog is its pride,” a uniformed Secret Service officer said Thursday afternoon as he stood guard outside the White House. “If you got kicked in the snout, your pride would be hurt too.”

The federal authorities charged Dominic Adesanya, 23, of Maryland, with several counts in connection with the incident. And in a sign of how seriously the agency takes its dogs, the federal authorities also filed felony charges of assaulting law enforcement officers — in this case, Jordan and Hurricane.

The dogs received a day off work as a reward. Citing the continuing investigation, the Secret Service did not make them or their handlers available on Thursday. But by the afternoon, Secret Service officials apparently realized the public relations windfall that had finally come their way. They posted on Twitter pictures of the dogs sitting with their tongues wagging, and posed between American and Secret Service flags.

The agency said on Twitter that Jordan, 5, “enjoys walks around” the White House, and that Hurricane, 6, “enjoys playing with his Kong toy.”

The way the episode unfolded Wednesday night was in sharp contrast to what happened one night last month and ultimately led to the resignation of Julia Pierson as the Secret Service director. In that case, a uniformed Secret Service dog handler chose not to let a dog loose to stop a fence jumper as he ran toward the front door to the White House. Uniformed agents tackled him after he got through the unlocked front door and into the East Room. The dog handler later told Secret Service officials that the dog was not let loose because it was not clear that the dog was tracking the man. Fearing that the dog would attack one of the officers trying to apprehend the man, the handler kept the dog on its leash.

Since then, the Secret Service has increased the number of attack dogs it has at the White House. And when the alarms went off there Wednesday night, the handlers were not afraid to let the dogs loose.

For many decades, the Secret Service has used bomb-sniffing dogs. But only in the past 10 years did it begin stationing the Belgian Malinois at the White House to take on intruders. Agency officials decided to use the dogs because they were faster than humans and their bite, while fierce, was far less lethal than a gunshot.

“There are all those bushes on the South Lawn that are far from the White House and the dogs can easily get through them and stop someone,” said an agency official who was involved in the decision to begin using the dogs.

The agency decided to use Belgian Malinois because they are more durable than German shepherds, which have longer hair and do not perform as well in the heat. Because they perform well in the heat, the dogs were used widely during the United States occupation of Iraq to detect explosives, and many veterans of that war wanted Belgian Malinois as pets when they returned.

One of the breed accompanied members of the Navy SEALs on the mission that killed Osama bin Laden. When President Obama met the dog after the raid, he stroked it, but its muzzle was kept on.

Jerry Mace, a breeder of Belgian Malinois and German shepherds in Summerfield, Fla., said law enforcement agencies were increasingly using the breed because the dogs could work until they were 14 and could be trained at a younger age than the shepherds.

“As budget cuts have hit police departments across the country they’ve looked for the most cost-effective dog,” Mr. Mace said. “Other breeds just don’t have the same longevity. They believe their money is much better spent on them.”

The dogs typically cost $6,500 to $8,500, and can be trained to be bomb sniffers or attackers. The precocious ones can begin working at the age of 1.

“They have an incredible drive to work and please their handlers and retrieve,” Mr. Mace said. “If I pull a ball out of my pocket, they go ballistic and will do anything for it. If I put it in my pocket they will try and rip my pants.”

Josh Earnest, the White House press secretary, took note of the dogs’ fierce reputation at his daily briefing. “As it relates to the — to the K-9 unit of the Secret Service, the animals that performed so bravely last night are not something that we come into regular contact with here,” he said. “I think that there’s probably a good reason why these animals are kept somewhat removed from employees and others who frequent the grounds at the White House.”