Boston police commissioner Edward F. Davis is beginning to be mentioned as a candidate for the next secretary of Homeland Security, with speculation in Washington and Boston suggesting that he may be in the mix for the prominent federal post.

Senators, who expect President Obama to announce his nomination within the next few weeks, have been told that the White House is vetting “a handful of people” for the position, according to a Senate source familiar with the talks but who spoke on the condition of anonymity.

The White House would neither confirm nor deny whether Davis is on a list of candidates. But as the commissioner has become a fixture in Washington in the wake of the Boston Marathon bombings, he has gained a reputation as a no-nonsense cop who encouraged Congress to seek more answers on whether the FBI was doing enough to share its intelligence information.

Senator Kelly Ayotte, a New Hampshire Republican and member of the Senate Committee on Homeland Security, said Davis would be “an excellent choice for Homeland Security secretary.”

“His service to Boston has been exemplary, and the Boston Police Department’s response to the Boston Marathon bombings was exceptional,” she said in a statement to the Globe. “His insight and experience is so important to federal efforts to improve information-sharing among agencies across the country.”

Davis initially declined to comment on the speculation, saying in a statement only, “I’m very happy serving the citizens of Boston.”

But later Thursday, Davis said he was open to the Homeland Security post.

“That’s something I’d have to consider if it happened,” Davis told WGBH’s Greater Boston news show, in response to questions about the rumors that he is a possible contender for the job.

To date, much of the speculation has centered on several other candidates, including New York City police commissioner Raymond Kelly; William J. Bratton, who has run the New York, Los Angeles and Boston police departments; Thad Allen, the retired Coast Guard commandant; TSA administrator John Pistole; and Jane Holl Lute, who was the department’s former deputy secretary

Several key lawmakers, including a few from Massachusetts, seemed caught of guard this week by talk that Davis also could be in the running. But some said the pick would make sense. Davis made a national impression when he led the investigation into the Boston Marathon bombings. He cut a national profile when he testified in the weeks after, appearing before several congressional committees.

“We applaud you,” Representative Michael McCaul, a Texas Republican and chairman of the House Committee on Homeland Security, said at a May hearing.

Davis has kept in touch with several senators, making frequent phone calls and discussing potential legislation that could come in response to the April 15 bombings.

“I personally think it would be a brilliant stroke of genius,” said the Senate source, of nominating Davis. ``Commissioner Davis, because of his recent experience, has the ability and public persona to take on the bigger dogs in the [intelligence] community. It would be very interesting nomination.”

The current secretary of homeland security, Janet Napolitano, announced three weeks ago that she was stepping down after more than four years in the position. She plans to leave in September, to become the president of the University of California system.

The role is an extremely challenging one, mixing law enforcement and border control issues with coordinating the government’s response to hurricanes and oil spills. The department also oversees immigration, and the next homeland security chief will come in at a time when the White House is aggressively pushing for immigration reform. Napolitano, as former governor of Arizona, was in a position to be an advocate for reform and that may be a trait the Obama administration looks for in her replacement.