A grand jury has voted a throw-away-the-key indictment — charging first-degree murder — against Yoselyn Ortega, the nanny accused in the bathtub slashing deaths of two young Upper West Side children under her care.

The rare charge — brought only 27 times in New York in 2011 — carries a maximum sentence of life without parole. It is reserved for the most heinous homicides, including serial killings, the killings of judges and cops, and killings deemed cruel and wanton.

In Ortega’s case, the grand jury found the charge is warranted because there were two victims, Lucia and Leo Krim, according to a copy of the indictment filed publicly today. The girl was 6 years old; the boy was 2.

Ortega has remained at New York-Presbyterian/Weill Cornell since Oct. 25, when the children were found bleeding to death in the bathtub of their West 75th Street apartment by their mother, Marina Krim. Ortega had slashed herself in the throat.

The nanny had been suffering mental and financial difficulties, and told cops that she resented the Krim family for asking her to do an extra five hours a week of housework.

No date has yet been set for Ortega to be arraigned on the indictment, which charges her with two counts of first-degree murder and two counts of second-degree murder. A call to Ortega’s lawyer, Valerie Van Leer-Greenberg, was not returned.