Staten Island District Attorney Daniel Donovan, a Republican candidate for Congress, said in an interview last night that deporting undocumented immigrants “should be explored.”

Mr. Donovan, an opponent of President Barack Obama’s plan to shield millions of undocumented immigrants from deportation, said it would be difficult to begin sending all of these immigrants to their home countries, but argued people who broke American law shouldn’t be rewarded.

“That’s a very difficult task to do. I don’t know how we would go about doing that so that should be explored,” Mr. Donovan said of deportations. “I just think we should reward the people who are following that process before we reward people who broke the law.”

For Mr. Donovan, a prosecutor who rose to prominence after he did not secure an indictment in the Eric Garner case, the idea of Mr. Obama using his executive authority in such a sweeping away was also irksome. “I think it’s the idea of an executive order, maybe not just about immigration but the use of executive orders when Congress is out of session. I think that’s an issue, too,” he said.

A federal judge recently blocked the White House’s immigration plan.

Mr. Donovan, speaking to reporters in Sheepshead Bay, Brooklyn after the Kings County Republican Party endorsed his candidacy, also reiterated his belief that funding for the Department of Homeland Security shouldn’t be held up, breaking from conservatives in Congress who are trying to thwart Mr. Obama’s immigration order with amendments to a Homeland Security funding bill.

Money for DHS will run out Friday.

“This agency is essential,” Mr. Donovan said.

Mr. Donovan is the front-runner in a special election set for May 5. The 11th Congressional District, spanning Staten Island and a sliver of Brooklyn, has not had representation in Congress since Republican Michael Grimm resigned in January following a guilty plea to a federal tax evasion charge.

Brooklyn Councilman Vincent Gentile is expected to receive the Democratic nomination.

New York Opinion: Israel Fund Crossed the Line