NEW YORK — It was a homecoming for Hillary Clinton on Wednesday at a kick-off rally in Harlem for a phase in the presidential campaign set on familiar turf.

With the state’s April 19 primary weeks away, Clinton and Sen. Bernie Sanders of Vermont have set up the contest as a potential battle royal between the Democratic candidates. Looming large also is businessman Donald Trump, a well-known figure in the state and a favorite punching bag for both Clinton and Sanders.

Campaigning here on Wednesday, Clinton, who served as New York’s junior senator for eight years, promised to crisscross the state like she did twice before when running for the Senate seat.

"I don’t have to tell you this is a wild election year,” Clinton said. "I’m not taking anything or anyone for granted.

“We’re going to work for every vote in every part of this state, just like I did when I ran for the Senate because New Yorkers took a chance on me, and I will never forget that."

Sanders, a native son of Brooklyn with the accent to prove it, also intends to campaign hard here, hammering Clinton on issues such as fracking and her ties to Wall Street.

The Clinton campaign strategy, however, is taking the cliche political truism that “all politics is local” to heart. Clinton highlighted her work in the Senate on local issues, from seeking medical care for 9/11 first responders to attracting research projects to upstate cities and connecting city restaurant chefs with farmers in the Hudson Valley.

“New Yorkers have always believed, if you work hard, and you do your part, you should be able to get ahead and stay ahead,” Clinton said. “That’s how I saw my job as your senator.”

Clinton intends to revive many of those stories, homing in on constituent service from her Senate days to make the case for what she might do as president. She will campaign in New York three days this week — more than she did in Wisconsin, a state that holds its primary much sooner on Tuesday.

Sanders is expected to begin campaigning in New York on Thursday.

Clinton revived some of her toughest criticism of Sanders: his support for legislation protecting gun manufacturers that she opposed, his knowledge of foreign policy issues, and the feasibility of his plans for college affordability and health care.

"My opponent and I share many of the same goals," Clinton said. "But some of his ideas for how to get there won't pass. Others just won’t work because the numbers just don’t add up."

"My opponent says, well, we’re just not thinking big enough. Well, this is New York. Nobody dreams bigger than we do," she added.

She slammed Sanders for making national security an afterthought and promised to take on his signature issue: income inequality.

"I take a backseat to no one on taking on income inequality," Clinton said. "I know how important it is to close that gap, to rebuild the middle class."

Polls show Clinton leading Sanders by double digits in New York. But Sanders also has ties here.

The Vermont senator was born and raised in Brooklyn, where his campaign opened an office a few minutes from the Clinton campaign’s Brooklyn Heights headquarters last week.

The Sanders campaign hopes to embarrass Clinton in her home state with a strong showing here. The two campaigns are also in talks for a debate to be held in Brooklyn before the primary.

Meanwhile, Clinton devoted as much attention to the Republican field, and to Trump in particular.

A new ad released by the campaign on Wednesday targeted Trump in New York, criticizing him for proposing a ban on Muslims entering the United States and calling on the United States to build a wall on its southern border with Mexico.

“We know better,” Clinton said in the ad as images of the state’s diversity rolled in the background.

The campaign did not say when the ad would begin airing and where in the state it would be broadcast.

In her speech on Wednesday, Clinton focused heavily on recounting the heroism of a Muslim doctor who was killed after running toward the Twin Towers on 9/11 to save victims.

"That’s what countless New Yorkers do every day in a million quiet ways, so we’re going to stand up for the values that make New York great and make America great," Clinton said.

She condemned Trump for "playing coy" with white supremacists, saying "demeaning and degrading" things about women, and suggesting that the United States should deport millions of Latino immigrant.

"It's cynical, and it's wrong, and it goes against everything New York and America stand for," Clinton added.

Earlier in the day, Clinton stopped by a Harlem bakery on Wednesday morning with the longtime New York Rep. Charles B. Rangel, who reflected on the presidential race this way: "New York City's contribution to the Democratic Party is Donald Trump."