Gov. Andrew Cuomo is upping the ante in his battle with Mayor Bill de Blasio — by putting a state trooper barracks right in Hizzoner’s back yard, sources told The Post.

The governor recently sent a scouting team to Manhattan to pick a location for the new barracks, a move that sources say is clearly designed to get in de Blasio’s face and under his skin.

“It’s just one more tit-for-tat thing between these two guys. This is [Cuomo] flexing his muscles. He said that he is also the governor of New York City,’’ a law enforcement source told The Post.

“People are asking, ‘What would [the troopers’] responsibility be?’ Don’t forget, there are 36,000 NYPD cops. So what are they going to do? Nobody knows,’’ the source said.

About 50 state troopers currently assist MTA cops patrolling trains and subway platforms at Penn Station and Grand Central Terminal.

They’ve been coming in from around the state since last fall, when Cuomo raised the number of state cops at the city’s transportation hubs in response to an increased threat of homegrown, ISIS-affiliated terrorism.

Now, when Cuomo’s power play is through, the number of state troopers in New York City will double, the source said.

Since arrangements for the new barracks are still being hashed out, the state has paid hundreds of thousands of dollars to lodge the extra troopers, sources said.

The out-of-town troopers typically spend around two weeks at $180-a-night hotels such as the Shelburne in Murray Hill before they’re swapped out for a fresh group, sources said.

State troopers currently have an office on Wards Island, but it’s mostly for administrative staff and some investigators.

The new digs would move Cuomo’s bigger force to the center of the action.

His people have already scouted potential sites at 4 World Trade Center and a Port Authority property on Park Avenue, and are set to look at other locations, the source said. The state co-owns the PA along with New Jersey.

It’s not clear what the timetable will be to open the barracks, but “It seems like he wants to get it done,’’ the source said of Cuomo.

The move is only the latest back-and-forth between the governor and mayor, who have clashed over everything from charter schools to how to pay for universal pre-K and how much to raise the minimum wage.

Neither Cuomo’s office nor the State Police responded to requests for comment.

Additional reporting by Jennifer Gould Keil and Kirstan Conley