PORTLAND — Maine’s highest court has upheld the mandatory minimum sentences required under the state’s so-called “Tina’s Law,” which aims to crack down on dangerous drivers by imposing stiff sentences.

In a unanimous ruling today, the Maine Supreme Judicial Court ruled the law is not unconstitutional. The ruling vacates a sentence on a Vietnam War veteran who was convicted of continuing to drive after losing his license as a habitual offender and having three drunken-driving convictions in 10 years.

Superior Court Justice Michaela Murphy sentenced Gerald Gilman to 90 days in jail, calling the two-year minimum in the law unconstitutionally harsh in Gilman’s case.

But supreme court justices agreed with prosecutors, who said Murphy’s sentence, which was less than the minimum required under “Tina’s Law,” was illegal.