St. Mary's Hospital in Passaic has reached an agreement with a Brooklyn-based realty company to sell its Pennington Avenue complex. The hospital, which emerged from bankruptcy protection last year, reached a deal on Monday with D & M Realty of Brooklyn, a hospital spokeswoman said. Terms of the sale were not disclosed. Vanessa Warner, a spokeswoman for St. Mary's, said D & M bought the 5-acre property with plans to redevelop the site for residential use. Whether those plans include demolition of the five-story hospital building is unknown. D & M did not return a phone call on Thursday seeking comment. The five-story brick building is the original home of St. Mary's and was built in 1927. It has 514 rooms and two parking lots, plus a gourmet kitchen and restaurant facilities inside. St. Mary's shut down most of the building in 2007 when it moved to the grounds of what was once The General Hospital Center at Passaic.