This is just what the city doctor ordered: More space for training teachers.

The Relay Graduate School of Education is opening downtown this week in larger space at the historical Cunard Building at 25 Broadway.

The nonprofit, previously located at 40 W. 20th St., will now have its own building within a building— literally.

It will boast a dedicated entrance on the ground floor as well as the entire third floor totaling 40,000 square feet.

This unique floor, which surrounds the building’s impressive dome, will host both Relay’s offices and classrooms.

The dome, adorned inside by colorful paintings, tops the building’s original great hall, which is now operated as an event space by Cipriani.

Along with eight classrooms, the new campus will also serve as its national headquarters with 20 offices and video conference rooms — and is large enough to accommodate professional development sessions.

The architects, Manhattan’s Method Design, created an open, collaborative space with a library, phone rooms, community meeting rooms, wellness areas, student commons and a bike room.

By September, it will serve 1,700 students for its local teacher prep program. Across the country, the school serves 3,700 aspiring and current teachers and 1,200 principals.

Lindsay Ornstein and Stephen Powers of Transwestern represented Relay in the negotiations for the space.

Bruce Surry and Gary Kamenetsky of CBRE represented the Wolfson Group ownership, which had an asking rent of $49 per square foot.

The building is a veritable hotbed of education with Léman Manhattan Preparatory School, Neve Yerushalayim College, the BMCC Center for Continuing Education and Workforce Development, and the Mildred Elley vocational school, among other tenants.