Two of New York City’s biggest hospital systems reached agreement on Wednesday to pursue a merger that would shake up the way medical care is delivered, especially in Manhattan, where hospitals compete to serve some of the wealthiest neighborhoods in the world.

The proposed merger would bring together NYU Langone Medical Center, a highly specialized academic medical center, and Continuum Health Partners, a network of several community-oriented hospitals, including Beth Israel and the two St. Luke’s-Roosevelt campuses.

It would create one of the largest health care systems in the city, one that would have immense market power under the new federal health care system, and put pressure on independent medical practices, insurance companies and even rival medical schools, which may have to find other places to train their students.

The deal was outlined in a memorandum of understanding approved on Tuesday and Wednesday by the boards of both nonprofit organizations, and it is still subject to final confirmation by the boards. It would also need regulatory approval, and at least one patient advocacy group promised to challenge it.