The landmark townhouse where Gov. Nelson Rockefeller died in the arms of his lover has been sold, The Post has learned.

Home to the Swedish restaurant Aquavit, the site housed the offices of singer Mariah Carey’s Crave record label until last summer.

The three connected properties consist of the former Rockefeller-family townhouses at 13 and 15 West 54th St., opposite the Museum of Modern Art’s sculpture garden, and an adjoining 13-story office building to the rear at 20 West 55th St.

Investment group Haut Brion Partners, a unit of Emmes & Co., closed the $30 million deal Wednesday.

The seller, Uniproperty, is the real-estate division of Unibank, a Danish-based bank that recently merged with Marita Bank.

Henry J. Hardenbergh, the architect of The Plaza hotel, designed the townhouses for the Rockefeller family in 1897. Both John D. Rockefeller and his son John Jr. lived at No. 13. Gov. Nelson Rockefeller used that building as an office, and later bought No. 15.

On the night of Jan. 26, 1979, ambulances were called to No. 13, where medics found Nelson, the former New York governor and later vice president under President Gerald Ford, dead.

He was with his young aide, Megan Marshack, then 27, when he suffered a fatal heart attack.

Apparently unsure of what to do under the compromising circumstances, Marshack called friends first, delaying the arrival of medical help.