Deputy Chief Jeff Cotner, who oversees police training, said the increase in applications demonstrated the adage about picking yourself up when you get knocked down.  It was a theme seized on by Hillary Clinton, who said in her nomination acceptance speech at the Democratic National Convention last week that the increase in applicants to the Dallas force showed “how Americans answer when the call for help goes out.”  The reaction comes at a particularly tense time for the police. Killings of police officers are 8 percent higher than a year ago, with a 78 percent increase in firearms-related officer fatalities, including ambush-style killings like those in Dallas. In his speech last month at the Republican National Convention, Donald J. Trump said that “America was shocked to its core” over the shootings in Dallas and a half-dozen other states.  Some of the applicants said they were signing up because they wanted to help the police. Others said they wanted to serve in neighborhoods where police shootings of unarmed black men have hardened years of anger and distrust. They admitted they were stepping into policing at an anguished moment.  “A lot of people said: ‘I don’t want you to go into policing. Can’t you find something else to do?’” said Jamile Owens, 29, who is African-American and had applied to the Dallas department about a month before the shooting.  The increase in applications was prompted by a call to the public from Chief David O. Brown, who stepped in front of the microphones four days after the shooting and spoke candidly about the challenges of police work and the department’s needs.  “We’re hiring,” Chief Brown said. “Get off that protest line and put an application in. And we’ll put you in your neighborhood, and we will help you resolve some of the problems you’re protesting about.”  At a funeral service for Sr. Cpl. Lorne B. Ahrens, an officer killed by the sniper at a protest in Dallas, a friend remembered him as "the guy you always wanted to show up."  The surge in interest could turn out to be a blip, the same way military enlistments rose modestly after the Sept. 11, 2001, attacks, only to weaken during the two wars that followed.  For years, police and sheriff’s departments across the country have struggled to find qualified recruits — female and minority candidates in particular — for jobs that may not seem worth the promise of pensions and good benefits. In the wake of protests and news media scrutiny over the police shootings of black men in places like Ferguson, Mo., Minnesota and Louisiana, police officials say persuading civilians to sign up to wear a police uniform has gotten even harder.  “Who wants to work in that type of environment?” Chief Cotner said. “It’s an unattractive occupation, and you’ve got to really truly be passionate about what you’re doing.”  The Dallas police have struggled on two fronts: to find enough recruits for a police academy class and to keep officers from migrating to higher-paying police forces. Dallas officers earn a starting salary of $44,658, according to the department’s website, about $10,000 less than some nearby police departments pay.  For the moment, it appears that the applicants are drawn by the distress. Police departments near Dallas say their application numbers have not risen in recent weeks. More people are applying to join the Police Department in Baton Rouge, La., where three officers were fatally shot 10 days after the Dallas attack, but the police there did not know how many additional applications they had received.  The Dallas department said it did not yet have a clear idea of the race, sex or ethnicity of its applicants.  Mayor Rawlings said Dallas, the nation’s ninth-largest city, had a huge need for officers.  “We need an excess,” he said. “We don’t know if it’s 200 or 300 or 400, but it’s a lot over this next year.”  Most of the 467 people who leapt to apply and take the Civil Service exam — the first step toward being hired — will probably never wear a Dallas police badge. The department says it hires only about 15 percent of the applicants who make it through a monthslong gantlet of background checks, fitness tests, polygraph tests and interviews.  Jaiston Sawyer, 30, a security guard, said he felt as though Chief Brown’s exhortation had been aimed squarely at him. Although he is an opinionated social-media user, Mr. Sawyer said, after the Dallas attack merely posting a response seemed too trivial. He said he had applied to join the police in his hometown, Denton, northwest of Dallas, and was planning to apply to Dallas as well.  “Nothing ever comes from it when you’re online or trying to protest,” said Mr. Sawyer, who first described his decision to Fox 4 News in Dallas. “That doesn’t make a difference as opposed to actually putting on the suit.”  Mr. Sawyer’s mother, Terri, said she was terrified at first, the memory of police funerals and the siege in downtown Dallas still fresh. She and Mr. Sawyer’s girlfriend worry about his safety. They have asked him: Why now?  “I wanted to have an actual role,” said Mr. Sawyer, who is black. “I decided to jump in.”  Mr. Leierer, the oil worker, has been getting ready to take the Civil Service exam on Aug. 19. He does push-ups and situps in an empty storage tank that serves as his oil field office. He has been target-shooting on his family’s land.  “I was scared at first,” his wife, Samantha, said. “All I hear is all the police officers being shot. But I’ve gotten used to it.”  The other day, Mr. Leierer, who is white, went for a 12-hour ride-along with a friend who is a sheriff’s deputy in his hometown, Weatherford. They responded to a 911 caller who had hung up, to someone irate about a bicycle in the yard and to a domestic abuse call where they met a woman with two black eyes who did not want to make a report.  If he makes it through the months of trainings and screenings, the job as a first-time Dallas officer will pay almost $15,000 a year less than what he earns in the oil fields, Mr. Leierer said. But he almost died a year ago when he grabbed a live power line, and he said he wanted a change.  “It’s more than just about backing the blue,” he said. “It’s about making real change in the community, just being a leader and trying to help the community as best you can. They definitely need everything they can get.”  A version of this article appears in print on August 3, 2016, on page A9 of the New York edition with the headline: Hundreds of Police Applicants Answer Dallas’s Call for Backup. Order Reprints| Today's Paper|Subscribe
The Dallas Police Department said it received 467 applications from people seeking to join the force in the two weeks after five officers were killed last month.