ELTs will offer angular resolution around 10mas in the near-IR and unprecedented sensitivity. While direct imaging of Earth-like exoplanets around Sun-like stars will stay out of reach of ELTs, we show that habitable planets around nearby M-type main sequence stars can be directly imaged. For about 300 nearby M dwarfs, the angular separation at maximum elongation is at or beyond 1 λ/D in the near-IR for an ELT. The planet to star contrast is 1e-7 to 1e-8, similar to what the upcoming generation of Extreme-AO systems will achieve on 8-m telescopes, and the potential planets are sufficiently bright for near-IR spectroscopy. We show that the technological solutions required to achieve this goal exist. For example, the PIAACMC coronagraph can deliver full starlight rejection, 100% throughput and sub-λ/D IWA for the EELT, GMT and TMT pupils. A closely related coronagraph is part of SCExAO on Subaru. We conclude that large ground-based telescopes will acquire the first high quality spectra of habitable planets orbiting M-type stars, while future space mission(s) will later target F-G-K type stars.