Formerly part of the St. Patrick’s Old Cathedral School, where Martin Scorsese was a student, the house spans more than 8,000 square feet

A townhouse that was formerly part of the St. Patrick’s Old Cathedral School complex in Manhattan is coming on the market for $23.5 million.

In the Nolita neighborhood, the buildings date back to 1826, when they were constructed in place of an orphanage and small parochial school on the site, according to the website of Basilica of St. Patrick’s Old Cathedral, which is still across the street.