New York City is in line to receive the $25.7 million in federal funding it has been seeking for the cost of securing Trump Tower during the presidential transition, under a bipartisan budget deal struck by federal lawmakers late Sunday.

The $1 trillion spending deal reached by top ranking members of Congress includes $68 million to reimburse local law enforcement agencies — the NYPD among them — for the cost of providing security to President Donald Trump and his family.

The budget agreement comes as NYPD officials prepare for Trump’s first visit back to his hometown Thursday since his inauguration — which could cost the city up to $308,000 per day, according to early estimates put out by the department. The White House has not said how long Trump will be in New York City.

New York City Mayor Bill de Blasio on Monday hailed the budget deal — to be voted on later this week — as “good news for our city and the hardworking police officers faced with this unprecedented security challenge.”

“We are getting what we are owed,” de Blasio said in a statement released by his office.

NYPD Commissioner James O’Neill, in a February letter to federal lawmakers, said it cost the city $25.7 million to protect Trump and his family between Election Day and Inauguration Day.

The NYPD estimates the city spends up to $146,000 per day to protect Trump’s family — including first lady Melania Trump and son Barron — when the president is not in town. That figure more than doubles to an average cost of $308,000 per day whenever the president is in town.

advertisement | advertise on newsday

Rep. Carolyn Maloney (D-Manhattan), who in March co-authored a letter demanding a full federal reimbursement that was signed by a bipartisan coalition of New York House members, called Sunday’s budget agreement “the right and fair thing to do.”

“It is ridiculous to expect local law enforcement, like the NYPD and FDNY, to bear the extraordinary and ongoing costs of protecting the president of the United States,” Maloney said in a statement, adding that protecting Trump is “clearly a national security concern and paying for it should be federal responsibility.”

The budget agreement includes $40 million to reimburse costs incurred after the inauguration, Maloney said.

Palm Beach, Florida, where Trump’s Mar-a-Lago estate is located, and Bedminster, New Jersey, home of Trump National Golf Course — two places the president has frequented since taking office — are among the jurisdictions where local police are expected to seek a federal reimbursement.