Major League Baseball will ink a lease for 400,000 square feet at the 48-story 1271 Sixth Ave. by Thursday morning, sources told the Post, but won’t play home at the Rockefeller Center west tower until 2019.

MLB is consolidating from several locations onto the fourth through ninth floors in the 2.1 million square-foot skyscraper between West 50th and 51st streets.

Its 8th floor has a landscaped outdoor terrace with views to Central Park and downtown. MLB will also have use of the re-imagined outdoor street-level plaza for public events.

MLB, under the leadership of Commissioner Rob Manfred, has been in 220,000 square feet of offices at 245 Park Ave. since 1999. The move will bring its headquarters together with MLB Advanced Media (aka MLB.com) and its video streaming service, BamTech, from around 115,000 square feet at Chelsea Market.

MLB Network will remain in its current studios in Secaucus, NJ, sources said.

The current 39,000 square-foot ground-floor studio at 1271 used by SportsNet New York for broadcasting shows around Mets baseball is being moved by Fred Wilpon’s Sterling Equities to 4 World Trade Center, sources said.

The space will be used by MLB as a retail store to sell its 30 teams’ licensed goods and for player appearances, sources added.

Scott Gottlieb, Ken Meyerson, Chris Corrinet, Brendan Herlihy and Daniel Wilpon of CBRE represented the tenant. Wilpon is related to Mets owner Fred Wilpon.

Another CBRE team led by Mary Ann Tighe, Howard Fiddle, Evan Haskell and John Maher represented Rockefeller Group, Inc. (RGI) in coordination with its in-house leasing team of Ed Guiltinan and Jennifer Stein.

The tower has been leased for roughly 50 years by Time Inc., which has now moved to Brookfield Place and to Brooklyn. Some sub-tenants will remain through the end of 2017, but the MLB space is already vacant and being renovated.

RGI is also planning a $600 million reinvention of the 1959 structure that will include replacing the entire curtain wall to provide 60 percent more interior light and better views. The renovation was designed by Pei Cobb Freed & Partners.

No one returned requests for comment prior to deadline