The 49-story office tower at One Dag Hammarskjöld Plaza is in contract to be sold for nearly $600 million, The Post has learned.

The buyer is Rockpoint Group, a Boston-based company that owns Starrett City, sources said.

The L-shaped black tower at 885 Second Ave. sits on the entire western blockfront between East 47th and 48th streets.

This is the first time the 815,000-square-foot building is being sold since it was designed by Emery Roth and developed by Lawrence Ruben in 1974.

In January, Richard Ruben, chief executive of the Ruben Cos., sold 1700 Broadway to Rockpoint for $453.million.

Both 885 Second and 1700 Broadway were marketed through Douglas Harmon, Adam Spies and Kevin Donner of Cushman & Wakefield.

The Ruben Cos. almost never sells its wholly owned properties, which include office, retail and residential holdings in New York, Washington, DC, and Boston. It is also invested in many joint ventures.

Since One Dag Hammarskjöld Plaza is mere steps from the United Nations complex, it hosts the missions of numerous countries, along with the UN’s own pension fund.

Because the countries are familiar with the property, sources told The Post, the offering attracted global interest, including from sovereign wealth funds.

The brokers, Ruben and Rockpoint didn’t respond to requests for comment.